Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-10-24 12:45:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-24 12:45:55 +0400
commit70bf00a74c1688e857e3ca1b143b4d7a57a30655 (patch)
tree8015eb2525a1aeca9c77fcbdf8fe222fff67948d /source/blender/blenlib/intern/string_utf8.c
parentdbe2fe5043b99f8a5717bbe5b6a9e36a6519f8c7 (diff)
parentf1cea89d99f0c80bdccd2ba1359142b5ff14cdb9 (diff)
svn merge ^/trunk/blender -r41200:41226 .
Diffstat (limited to 'source/blender/blenlib/intern/string_utf8.c')
-rw-r--r--source/blender/blenlib/intern/string_utf8.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c
index b1ad04eb70d..b4c58d3bab4 100644
--- a/source/blender/blenlib/intern/string_utf8.c
+++ b/source/blender/blenlib/intern/string_utf8.c
@@ -312,6 +312,18 @@ size_t BLI_strncpy_wchar_from_utf8(wchar_t *dst_w, const char *src_c, const size
}
+/* uses glib functions but not from glib */
+/* gets the size of a single utf8 char */
+int BLI_str_utf8_size(const char *p)
+{
+ int mask = 0, len;
+ unsigned char c = (unsigned char) *p;
+
+ UTF8_COMPUTE (c, mask, len);
+
+ return len;
+}
+
/* was g_utf8_get_char */
/**
* BLI_str_utf8_as_unicode: