9#ifndef litesql_string_hpp
10#define litesql_string_hpp
19 std::ostringstream ost;
25bool startsWith(
const std::string& what,
const std::string& with);
27bool endsWith(
const std::string& what,
const std::string& with);
33std::string capitalize(
const std::string& s);
34std::string decapitalize(
const std::string& s);
42std::string
replace(
const std::string& s,
const std::string& what,
const std::string& with);
46int atoi(
const std::string &s);
48std::string
operator*(
int amount,
const std::string &s);
50std::string
operator*(
const std::string &s,
int amount);
std::string lstrip(std::string s)
returns a string with no empty characters at the beginning of the string
std::string rstrip(std::string s)
returns a string with no empty characters at the end of the string
std::string replace(const std::string &s, const std::string &what, const std::string &with)
returns a copy string 's' where 'what' is replaced with 'with'
std::string toString(T a)
returns string representation of passed parameter if it can be written to ostringstream
Definition string.hpp:18
int hexToInt(const std::string &s)
converts string representation of a hex number to integer
int atoi(const std::string &s)
string version of atoi
bool endsWith(const std::string &what, const std::string &with)
returns true if 'what' end with 'with'
std::string toLower(std::string s)
returns lower-case version of the string
std::string operator*(int amount, const std::string &s)
returns a string which is duplicated 'amount' times
Definition string.cpp:101
std::string escapeSQL(const std::string &str)
escapes ' characters so that they do not break SQL statements.
bool startsWith(const std::string &what, const std::string &with)
returns true if 'what' starts with 'with'
std::string toUpper(std::string s)
returns upper-case version of the string