diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2012-06-27 14:26:29 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2012-06-27 14:26:29 +0200 |
| commit | ecb3a737a9133440af2026a0caa668a1516911a0 (patch) | |
| tree | deb1d9b8f6b1870aec1d799392169528ccbc3740 /src/string.cc | |
| parent | ae590f35d86ecbfeaf1e471d5cb2590174722c97 (diff) | |
Tweak String class, and cleanup usages
remove String::clear, add operator=(String&&) add str_to_int(const String&)
to replace atoi.
Diffstat (limited to 'src/string.cc')
| -rw-r--r-- | src/string.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/string.cc b/src/string.cc index 30654256..9e2d1507 100644 --- a/src/string.cc +++ b/src/string.cc @@ -25,6 +25,11 @@ String int_to_str(int value) return String(buffer + pos); } +int str_to_int(const String& str) +{ + return atoi(str.c_str()); +} + std::vector<String> split(const String& str, Character separator) { auto begin = str.begin(); |
