Code Cleanup

- 'uft8_length' and 'utf8_text_length' now return unsigned ints.
This commit is contained in:
Scott Kostyshak 2013-01-07 03:32:30 -05:00 committed by Paul Beckingham
parent 4ca5c85054
commit 3583e2ff58
4 changed files with 19 additions and 15 deletions

View file

@ -174,7 +174,7 @@ int utf8_sequence (unsigned int character)
////////////////////////////////////////////////////////////////////////////////
// Length of a string in characters.
int utf8_length (const std::string& str)
unsigned int utf8_length (const std::string& str)
{
int byteLength = str.length ();
int charLength = byteLength;
@ -193,7 +193,7 @@ int utf8_length (const std::string& str)
}
////////////////////////////////////////////////////////////////////////////////
int utf8_text_length (const std::string& str)
unsigned int utf8_text_length (const std::string& str)
{
int byteLength = str.length ();
int charLength = byteLength;