Changeset 1276 for code/branches/console/src/util
- Timestamp:
- May 15, 2008, 1:05:58 AM (17 years ago)
- Location:
- code/branches/console/src/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/console/src/util/String.cc
r1149 r1276 185 185 else 186 186 return str; 187 } 188 189 /** 190 @brief Removes enclosing {braces}. 191 @param str The string to strip 192 @return The striped string 193 */ 194 std::string stripEnclosingBraces(const std::string& str) 195 { 196 std::string output = str; 197 198 while (output.size() >= 2 && output[0] == '{' && output[output.size() - 1] == '}') 199 output = output.substr(1, output.size() - 2); 200 201 return output; 187 202 } 188 203 -
code/branches/console/src/util/String.h
r1062 r1276 47 47 48 48 _UtilExport std::string stripEnclosingQuotes(const std::string& str); 49 _UtilExport std::string stripEnclosingBraces(const std::string& str); 49 50 50 51 _UtilExport bool isEmpty(const std::string& str);
Note: See TracChangeset
for help on using the changeset viewer.