diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2013-05-21 19:08:12 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2013-05-21 19:08:12 +0000 |
commit | 8c00d09bb4be779e888dbc78b688462e7bb6dbdf (patch) | |
tree | 8a219d571a73fc641a7b0c57e730b5c105b6da82 /src/htscharset.h | |
parent | 03d57e2e73891f28f09a721d5d58108912d7157f (diff) |
Fixed hts_isCharsetUTF8()
Added hts_copyStringUTF8()
Diffstat (limited to 'src/htscharset.h')
-rw-r--r-- | src/htscharset.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/htscharset.h b/src/htscharset.h index c992d23..0551e88 100644 --- a/src/htscharset.h +++ b/src/htscharset.h @@ -93,6 +93,16 @@ extern int hts_isCharsetUTF8(const char *charset); **/ extern size_t hts_stringLengthUTF8(const char *s); +/** + * Copy at most 'nBytes' bytes from src to dest, not truncating UTF-8 + * sequences. + * Returns the number of bytes copied, not including the terminating \0. + **/ +extern size_t hts_copyStringUTF8(char *dest, const char *src, + size_t nBytes); + +/* WIN32 specific. */ + #ifdef _WIN32 /** |