Changes between Version 5 and Version 6 of code/doc/String
- Timestamp:
- Apr 12, 2017, 11:35:40 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
code/doc/String
v5 v6 1 1 = String = 2 [[TracNav(TracNav/TOC_Development)]]3 2 4 3 String defines several useful functions for string manipulation. The following list gives a short overview: … … 59 58 60 59 * '''addSlashes('''''string''''')''': Adds backslashes to the given string which makes special chars visible. Existing slashes will be doubled. 61 * Examples: "\\" -> "\\\\", "\n" -> "\\n"60 * Examples: {{{"\\"}}} -> {{{"\\\\"}}}, {{{"\n"}}} -> {{{"\\n"}}} 62 61 * '''removeSlashes('''''string''''')''': Removes backslashes from the given string. Double backslashes are interpreted as one backslash. 63 * Examples: "\\\\" -> "\\", "\\n" -> "\n"62 * Examples: {{{"\\\\"}}} -> {{{"\\"}}}, {{{"\\n"}}} -> {{{"\n"}}} 64 63 65 64 * '''lowercase('''''string* pointer''''')''': Replaces each char between A and Z with its lowercase equivalent. Uses '''tolower''' (C function). … … 78 77 * hasComment(" # test") = true 79 78 * hasComment("a # test") = true 80 * '''getComment('''''string''''')''': If the string contains a comment, the comment gets returned (including the comment 79 * '''getComment('''''string''''')''': If the string contains a comment, the comment gets returned (including the comment symbol), an empty string otherwise. 81 80 * Example: getComment("abc # test") = "# test" 82 symbol), an empty string otherwise.83 81 * '''getCommentPosition('''''string''''')''': If the string contains a comment, the position of the comment-symbol gets returned, std::string::npos otherwise. 84 82 * Examples: