Changeset 1830 for code/trunk
- Timestamp:
- Sep 25, 2008, 12:45:32 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/util/String.cc
r1791 r1830 53 53 while ((pos = (*str).find("\t")) < (*str).length()) 54 54 (*str).erase(pos, 1); 55 while ((pos = (*str).find("\n")) < (*str).length()) 56 (*str).erase(pos, 1); 55 57 } 56 58 … … 121 123 while ((quote = getNextQuote(str, quote + 1)) < pos) 122 124 { 125 if (quote == pos) 126 return false; 123 127 quotecount++; 124 128 } … … 131 135 132 136 /** 133 @brief Returns true if the string contains something like '..."between quotes"...' 137 @brief Returns true if the string contains something like '..."between quotes"...'. 134 138 @param The string 135 139 @return True if there is something between quotes … … 158 162 159 163 /** 160 @brief Removes enclosing quotes if available .164 @brief Removes enclosing quotes if available (including whitespaces at the outside of the quotes). 161 165 @brief str The string to strip 162 166 @return The string with removed quotes … … 198 202 199 203 /** 200 @brief Removes enclosing {braces} .204 @brief Removes enclosing {braces} (braces must be exactly on the beginning and the end of the string). 201 205 @param str The string to strip 202 206 @return The striped string … … 213 217 214 218 /** 215 @brief Determines if a string i n is a comment.219 @brief Determines if a string is a comment (starts with a comment-symbol). 216 220 @param str The string to check 217 221 @return True = it's a comment … … 384 388 385 389 /** 386 @brief compares two strings without ignoring the case387 @param s1 first string388 @param s2 second string390 @brief Compares two strings ignoring different casing. 391 @param s1 First string 392 @param s2 Second string 389 393 */ 390 394 int nocaseCmp(const std::string& s1, const std::string& s2) … … 412 416 413 417 /** 414 @brief compares two strings without ignoring the case415 @param s1 first string416 @param s2 second string417 @param len how far from the beginning to start.418 @brief Compares the first 'len' chars of two strings ignoring different casing. 419 @param s1 First string 420 @param s2 Second string 421 @param len Maximal number of chars to compare 418 422 */ 419 423 int nocaseCmp(const std::string& s1, const std::string& s2, unsigned int len)
Note: See TracChangeset
for help on using the changeset viewer.