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.
string to limit the length
maximum number of code points in the resulting string
Out: The maximum number of code points in str is n.
The truncated string for method chaining
See Implementation
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.