From 288d55b511bcfd5ed3d6b464046808ce82aedaec Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sat, 30 Oct 2010 02:03:02 +0200 Subject: s3:lib/util_str: add strlen_m_ext() that takes input and output charset The function calculates the number of units (8 or 16-bit, depending on the destination charset), that would be needed to convert the input string which is expected to be in in src_charset encoding to the dst_charset (which should be a unicode charset). --- source3/include/proto.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/include') diff --git a/source3/include/proto.h b/source3/include/proto.h index 89aa623314..5e88476e44 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1433,6 +1433,8 @@ char *strnrchr_m(const char *s, char c, unsigned int n); char *strstr_m(const char *src, const char *findstr); void strlower_m(char *s); void strupper_m(char *s); +size_t strlen_m_ext(const char *s, const charset_t src_charset, + const charset_t dst_charset); size_t strlen_m(const char *s); size_t strlen_m_term(const char *s); size_t strlen_m_term_null(const char *s); -- cgit