sanitizeText

Replaces invalid UTF-8 sequences with U+FFFD (if there's enough space,) and Newlines with '\n'.

char[]
sanitizeText
(
char[] text
)

Parameters

text
Type: char[]

The string to be sanitized; no new memory is allocated.

Meta