diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-06-16 00:01:59 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-06-16 00:01:59 +0300 |
commit | a199cd76a19e6ba9c9bcbadc66c065285fe63886 (patch) | |
tree | f8bf9194baebc1f157e0b736d358e1c7f12ba06a /indra/llcommon/llstring.h | |
parent | 0a7144c8708d5a231b9588ff3a13fe3345110f34 (diff) | |
parent | 0597f876469d8ef672a270528cbeecc069ab5e66 (diff) |
Merged in lindenlab/viewer-lynx
Diffstat (limited to 'indra/llcommon/llstring.h')
-rw-r--r-- | indra/llcommon/llstring.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 393f6d7a8c..a40db0f8cc 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -564,6 +564,17 @@ LL_COMMON_API S32 utf8str_compare_insensitive( const std::string& rhs); /** +* @brief Properly truncate a utf8 string to a maximum character count. +* +* If symbol_len is longer than the string passed in, the return +* value == utf8str. +* @param utf8str A valid utf8 string to truncate. +* @param symbol_len The maximum number of symbols in the return value. +* @return Returns a valid utf8 string with symbol count <= max_len. +*/ +LL_COMMON_API std::string utf8str_symbol_truncate(const std::string& utf8str, const S32 symbol_len); + +/** * @brief Replace all occurences of target_char with replace_char * * @param utf8str A utf8 string to process. |