X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=string_rep.h;h=ce4ca3e620eda35c002d7d59e308185d8a4a36f3;hb=373937ba4ad87e9fa55dbf89644182050ed1b75a;hp=fd6c00b5c58ed06c1d7384abc7d702ba875a83c9;hpb=6d30fa5c7d03437d992a80234c88d8eb6431b35e;p=cparser diff --git a/string_rep.h b/string_rep.h index fd6c00b..ce4ca3e 100644 --- a/string_rep.h +++ b/string_rep.h @@ -25,16 +25,19 @@ enum string_encoding_t { STRING_ENCODING_CHAR, + STRING_ENCODING_CHAR16, + STRING_ENCODING_CHAR32, + STRING_ENCODING_UTF8, STRING_ENCODING_WIDE }; typedef enum string_encoding_t string_encoding_t; typedef struct string_t { - const char *begin; /**< UTF-8 encoded string, the last character is - * guaranteed to be 0 */ - size_t size; /**< size of string in bytes (not characters) */ + char const *begin; /**< UTF-8 encoded string, the last character is guaranteed to be \0. */ + size_t size; /**< size of string in bytes (not characters), without terminating \0. */ + string_encoding_t encoding; } string_t; -size_t get_string_len(string_encoding_t enc, string_t const *str); +size_t get_string_len(string_t const *str); #endif