Changeset cbf9099 in mainline for uspace/lib/cpp/src/string.cpp
- Timestamp:
- 2018-07-05T21:41:21Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cec6360
- Parents:
- 5d235bf0
- git-author:
- Dzejrou <dzejrou@…> (2018-04-24 22:50:33)
- git-committer:
- Dzejrou <dzejrou@…> (2018-07-05 21:41:21)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/src/string.cpp
r5d235bf0 rcbf9099 40 40 { 41 41 char* end; 42 long result = strtol(str.c_str(), &end, base);42 long result = hel::strtol(str.c_str(), &end, base); 43 43 44 44 if (end != str.c_str()) … … 56 56 { 57 57 char* end; 58 unsigned long result = strtoul(str.c_str(), &end, base);58 unsigned long result = hel::strtoul(str.c_str(), &end, base); 59 59 60 60 if (end != str.c_str()) … … 102 102 { 103 103 char* tmp; 104 asprintf(&tmp, "%d", val);104 hel::asprintf(&tmp, "%d", val); 105 105 106 106 std::string res{tmp}; … … 113 113 { 114 114 char* tmp; 115 asprintf(&tmp, "%u", val);115 hel::asprintf(&tmp, "%u", val); 116 116 117 117 std::string res{tmp}; … … 124 124 { 125 125 char* tmp; 126 asprintf(&tmp, "%ld", val);126 hel::asprintf(&tmp, "%ld", val); 127 127 128 128 std::string res{tmp}; … … 135 135 { 136 136 char* tmp; 137 asprintf(&tmp, "%lu", val);137 hel::asprintf(&tmp, "%lu", val); 138 138 139 139 std::string res{tmp}; … … 146 146 { 147 147 char* tmp; 148 asprintf(&tmp, "%lld", val);148 hel::asprintf(&tmp, "%lld", val); 149 149 150 150 std::string res{tmp}; … … 157 157 { 158 158 char* tmp; 159 asprintf(&tmp, "%llu", val);159 hel::asprintf(&tmp, "%llu", val); 160 160 161 161 std::string res{tmp}; … … 168 168 { 169 169 char* tmp; 170 asprintf(&tmp, "%f", val);170 hel::asprintf(&tmp, "%f", val); 171 171 172 172 std::string res{tmp}; … … 179 179 { 180 180 char* tmp; 181 asprintf(&tmp, "%f", val);181 hel::asprintf(&tmp, "%f", val); 182 182 183 183 std::string res{tmp}; … … 190 190 { 191 191 char* tmp; 192 asprintf(&tmp, "%Lf", val);192 hel::asprintf(&tmp, "%Lf", val); 193 193 194 194 std::string res{tmp}; … … 299 299 return wstring{}; 300 300 } 301 302 /**303 * 21.6, hash support:304 */305 306 // TODO: implement307 301 308 302 /** … … 319 313 #pragma GCC diagnostic push 320 314 #pragma GCC diagnostic ignored "-Wliteral-suffix" 315 inline namespace literals { 316 inline namespace string_literals 317 { 321 318 string operator "" s(const char* str, size_t len) 322 319 { … … 340 337 } 341 338 */ 339 }} 342 340 #pragma GCC diagnostic pop 343 341 }
Note:
See TracChangeset
for help on using the changeset viewer.