Limits the length of a UTF-8 string, to at most the specified number of bytes.
Truncate the length of a UTF-8 string and append a set ending. The string is initially truncated so that it is of maximum length n (this includes the extra ending paramter so the string is truncated to position n - ending.length).
Truncates a string at the last space before the n-th Unicode character or, if the resulting string is too short, at the n-th Unicode character. The string should be a valid UTF-8 (the caller should have validated it before calling this function).
Limits str to a length of n UTF-8 code points, cutting off on the last space, if found. If str is not valid UTF-8, str.length is assumed to be the number of code points.
Calculates the number of UTF8 code points in a UTF8-encoded string. Calls the standard unicode error handler on error, which throws a new UnicodeException.
Calculates the number of UTF8 code points in a UTF8-encoded string. Calls error_dg if an invalid UTF8 code unit is detected, which may throw an exception to abort processing.
UTF-8 representation of "…".
Contains utility functions for working with unicode strings. Contains a function to return the length of a UTF-8 string, a method to truncate a UTF-8 string to the nearest whitespace character that is less than a maximum length parameter, and a method to truncate a UTF-8 string and append a set ending to it.
Example usage: