lib/util/charset/util_unistr: add strlen_m_ext_term() - variant of strlen_m_ext(...
[kai/samba.git] / lib / util / charset / util_unistr.c
index 93fc24da15fa31f845ca471e22774d8a3c4ec554..74b453bf464d23883c75868662a93be930e8590a 100644 (file)
@@ -315,6 +315,16 @@ _PUBLIC_ size_t strlen_m_ext(const char *s, charset_t src_charset, charset_t dst
        return count;
 }
 
+_PUBLIC_ size_t strlen_m_ext_term(const char *s, const charset_t src_charset,
+                                 const charset_t dst_charset)
+{
+       if (!s) {
+               return 0;
+       }
+       return strlen_m_ext(s, src_charset, dst_charset) + 1;
+}
+
+
 /**
  Count the number of UCS2 characters in a string. Normally this will
  be the same as the number of bytes in a string for single byte strings,