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 "…".
Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).
Copyright (c) 2009-2016 dunnhumby Germany GmbH. All rights reserved.
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: