19 | | * getNextQuote("123\"567\"9", 0) = 4 |
20 | | * getNextQuote("123\"567\"9", 4) = 4 |
21 | | * getNextQuote("123\"567\"9", 6) = 8 |
22 | | * getNextQuote("123\"567\"9", 9) = std::npos |
| 19 | * getNextQuote("012\"456\"89", 0) = 3 |
| 20 | * getNextQuote("012\"456\"89", 3) = 3 |
| 21 | * getNextQuote("012\"456\"89", 5) = 7 |
| 22 | * getNextQuote("012\"456\"89", 8) = std::string::npos |
25 | | * isBetweenQuotes("123\"567\"9", 1) = false |
26 | | * isBetweenQuotes("123\"567\"9", 4) = false |
27 | | * isBetweenQuotes("123\"567\"9", 5) = true |
28 | | * isBetweenQuotes("123\"567\"9", 8'''''''''') = false |
29 | | * isBetweenQuotes("123\"567\"9", 9) = false |
| 25 | * isBetweenQuotes("012\"456\"89", 0) = false |
| 26 | * isBetweenQuotes("012\"456\"89", 3) = false |
| 27 | * isBetweenQuotes("012\"456\"89", 4) = true |
| 28 | * isBetweenQuotes("012\"456\"89", 7) = false |
| 29 | * isBetweenQuotes("012\"456\"89", 8'''''''''') = false |
52 | | * '''isEmpty('''''string''''')''': |
53 | | * '''isComment('''''string''''')''': |
54 | | * '''isNumeric('''''string''''')''': |
| 52 | * '''isEmpty('''''string''''')''': Determines if a string is empty (contains only whitespaces (' ', \t, \n). |
| 53 | * '''isComment('''''string''''')''': Determines if a string is a comment (starts with a comment-symbol). A comment is defined by a leading '#', '%', ';' or '//'. |
| 54 | * Examples: |
| 55 | * isComment("# test") = true |
| 56 | * isComment("a # test") = false |
| 57 | * isComment(" # test") = true |
| 58 | * '''isNumeric('''''string''''')''': Determines if a string contains only numbers and maximal one '.'. |
68 | | * '''hasComment('''''string''''')''': |
69 | | * '''getComment('''''string''''')''': |
70 | | * '''getCommentPosition('''''string''''')''': |
71 | | * '''getNextCommentPosition('''''string''''', '''''start''''')''': |
| 74 | * '''hasComment('''''string''''')''': Returns true if the string contains a comment, introduced by #, %, ; or //. |
| 75 | * Examples: |
| 76 | * hasComment("test") = false |
| 77 | * hasComment("# test") = true |
| 78 | * hasComment(" # test") = true |
| 79 | * hasComment("a # test") = true |
| 80 | * '''getComment('''''string''''')''': If the string contains a comment, the comment gets returned (including the comment |
| 81 | * Example: getComment("abc # test") = "# test" |
| 82 | symbol), an empty string otherwise. |
| 83 | * '''getCommentPosition('''''string''''')''': If the string contains a comment, the position of the comment-symbol gets returned, std::string::npos otherwise. |
| 84 | * Examples: |
| 85 | * getCommentPosition("# test") = 0 |
| 86 | * getCommentPosition("abc # test") = 4 |
| 87 | * getCommentPosition("abc test") = std::string::npos |
| 88 | * '''getNextCommentPosition('''''string''''', '''''start''''')''': Returns the position of the next comment-symbol, starting with start. |
| 89 | * Examples: |
| 90 | * getCommentPosition("abc # test", 0) = 4 |
| 91 | * getCommentPosition("abc # test", 4) = 4 |
| 92 | * getCommentPosition("abc # test", 5) = std::string::npos |
| 93 | |