text cut to at most max UTF-16 units, never inside a surrogate pair: when the cut
would land after a high surrogate it is made one unit earlier, so a message that holds
the cut text is well-formed (a lone \ud83d makes jq reject a whole JSON stream).
Text no longer than max is returned as it is; the caller marks a cut.
textcut to at mostmaxUTF-16 units, never inside a surrogate pair: when the cut would land after a high surrogate it is made one unit earlier, so a message that holds the cut text is well-formed (a lone\ud83dmakes jq reject a whole JSON stream). Text no longer thanmaxis returned as it is; the caller marks a cut.