guessstring.h 797 B

123456789101112131415161718192021222324252627
  1. ////////////////////////////////////////////////////////////////////////////////
  2. /// \file guessstring.h
  3. /// \brief Utility functions for working with strings (std::string and char*)
  4. ///
  5. /// \author Joe Siltberg
  6. /// $Date$
  7. ///
  8. ////////////////////////////////////////////////////////////////////////////////
  9. #ifndef LPJ_GUESS_GUESSSTRING_H
  10. #define LPJ_GUESS_GUESSSTRING_H
  11. #include <string>
  12. /// Removes leading and trailing whitespace from a string
  13. std::string trim(const std::string& str);
  14. /// Converts a string to upper case
  15. std::string to_upper(const std::string& str);
  16. /// Converts a string to lower case
  17. std::string to_lower(const std::string& str);
  18. /// Creates a string with printf style formatting
  19. std::string format_string(const char* format, ...);
  20. #endif // LPJ_GUESS_GUESSSTRING_H