endif * @str: the string to search through. * @c: the character to not look for. * * Return value: the index of the last character that is not c. * */
| 124 | * Return value: the index of the last character that is not c. |
| 125 | * */ |
| 126 | unsigned int getIndexOfLastNotChar16(const std::vector<char16_t>& str, char16_t c) |
| 127 | { |
| 128 | int len = static_cast<int>(str.size()); |
| 129 | |
| 130 | int i = len - 1; |
| 131 | for (; i >= 0; --i) |
| 132 | if (str[i] != c) |
| 133 | return i; |
| 134 | |
| 135 | return i; |
| 136 | } |
| 137 | |
| 138 | /* |
| 139 | * @str: the string to trim |