Truncates message on a UTF-8 character boundary so the result, including the appended …[truncated N bytes] marker, is at most maxBytes UTF-8 bytes. N is the number of bytes removed from the original. Returns message unchanged when it already fits.
message
…[truncated N bytes]
maxBytes
N
Truncates
messageon a UTF-8 character boundary so the result, including the appended…[truncated N bytes]marker, is at mostmaxBytesUTF-8 bytes.Nis the number of bytes removed from the original. Returnsmessageunchanged when it already fits.