LimitUTF8Bytes (open)
Limit a UTF-8 encoded string to a maximum byte length
Syntax
// Core function, no LOADLIB necessary
STRING FUNCTION LimitUTF8Bytes(STRING text, INTEGER numbytes, STRING addiftruncated)Parameters
STRING textText to limit
INTEGER numbytesMaximum length in bytes
STRING addiftruncatedText to add if any data is truncated. Will never cause the string to exceed numbytes.
Return value
STRINGText with a maximum length of numbytes bytes.