CRASH: player initial phase missing
[Tsunagari.git] / src / string.h
blobf3f445741378af0e1f8c88cac473e2a966800aa7
1 /*********************************
2 ** Tsunagari Tile Engine **
3 ** string.h **
4 ** Copyright 2011-2012 OmegaSDG **
5 *********************************/
7 #ifndef STRING_H
8 #define STRING_H
10 #include <string>
11 #include <vector>
13 //! Return a bool from a "true"/"false" string.
14 bool parseBool(const std::string& s);
16 //! Split a string by a delimiter.
17 std::vector<std::string> splitStr(std::string str,
18 const std::string& delimiter);
20 //! Convert an integer to a representative string.
21 std::string itostr(int in);
23 //! Returns true if the string contains only digits, whitespace, and minus.
24 bool isInteger(const std::string& s);
26 //! Returns true if the string contains only digits, whitespace, minus, and
27 //! period.
28 bool isDecimal(const std::string& s);
30 #endif