Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 5 and Version 6 of code/doc/String


Ignore:
Timestamp:
Apr 12, 2017, 11:35:40 PM (7 years ago)
Author:
landauf
Comment:

fixed links and formatting

Legend:

Unmodified
Added
Removed
Modified
  • code/doc/String

    v5 v6  
    11= String =
    2 [[TracNav(TracNav/TOC_Development)]]
    32
    43String defines several useful functions for string manipulation. The following list gives a short overview:
     
    5958
    6059 * '''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"}}}
    6261 * '''removeSlashes('''''string''''')''': Removes backslashes from the given string. Double backslashes are interpreted as one backslash.
    63   * Examples: "\\\\" -> "\\", "\\n" -> "\n"
     62  * Examples: {{{"\\\\"}}} -> {{{"\\"}}}, {{{"\\n"}}} -> {{{"\n"}}}
    6463
    6564 * '''lowercase('''''string* pointer''''')''': Replaces each char between A and Z with its lowercase equivalent. Uses '''tolower''' (C function).
     
    7877   * hasComment(" # test") = true
    7978   * 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.
    8180  *  Example: getComment("abc # test") = "# test"
    82 symbol), an empty string otherwise.
    8381 * '''getCommentPosition('''''string''''')''': If the string contains a comment, the position of the comment-symbol gets returned, std::string::npos otherwise.
    8482  *  Examples: