* Scans the string for invalid characters and replaces them with a * question mark '?' (if not ignored). * @param str The string to validate. * @param settings The settings for the string validation. * @note The string must be properly NUL terminated. */
| 155 | * @note The string must be properly NUL terminated. |
| 156 | */ |
| 157 | void StrMakeValidInPlace(char *str, StringValidationSettings settings) |
| 158 | { |
| 159 | InPlaceReplacement inplace(std::span(str, strlen(str))); |
| 160 | StrMakeValid(inplace.builder, inplace.consumer, settings); |
| 161 | /* Add NUL terminator, if we ended up with less bytes than before */ |
| 162 | if (inplace.builder.AnyBytesUnused()) inplace.builder.PutChar('\0'); |
| 163 | } |
| 164 | |
| 165 | /** |
| 166 | * Scans the string for invalid characters and replaces them with a |
no test coverage detected