Added to_string() and operator+(const char *, string)
This commit is contained in:
parent
77484f1c17
commit
c62ceeef5a
1 changed files with 10 additions and 0 deletions
10
src/utils.h
10
src/utils.h
|
|
@ -278,6 +278,16 @@ extern string empty_string;
|
||||||
|
|
||||||
strings_list split_arguments(const char * line);
|
strings_list split_arguments(const char * line);
|
||||||
|
|
||||||
|
inline string to_string(long num) {
|
||||||
|
std::ostringstream buf;
|
||||||
|
buf << num;
|
||||||
|
return buf.str();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline string operator+(const char * left, const string& right) {
|
||||||
|
return string(left) + right;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace ledger
|
} // namespace ledger
|
||||||
|
|
||||||
/*@}*/
|
/*@}*/
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue