summaryrefslogtreecommitdiff
path: root/indra/llcommon/llstring.h
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2016-10-18 15:38:33 -0400
committerOz Linden <oz@lindenlab.com>2016-10-18 15:38:33 -0400
commit8e30a2f06dd1ce407fcb2399823efed883b317d2 (patch)
treee5b22fb9fd2b5e99cf195d00338da57ecdade0d4 /indra/llcommon/llstring.h
parent7df153e352ce50ded382df020cc3696b8c1b9325 (diff)
parent086c1342152895da28d2e0130d09432152604ca8 (diff)
merge changes for 4.1.1-release
Diffstat (limited to 'indra/llcommon/llstring.h')
-rw-r--r--indra/llcommon/llstring.h11
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.