diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2021-05-17 15:12:14 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2021-05-17 15:12:14 -0700 |
commit | ccb646d369a9ee9b8e415dd5a14d0685a7963f1b (patch) | |
tree | 5bd46ce24e9d9759e8cd08b9bec83062ad276988 /libutils/Unicode.cpp | |
parent | 6fcfc2f4dbc0fece721c9e935765bb6f183965ad (diff) | |
parent | 00011d0d9a7a98703700cf81ac198a8a60914e27 (diff) |
Merge 00011d0d9a7a98703700cf81ac198a8a60914e27 on remote branch
Change-Id: Ibe242e16fb5d13157cad7df3596abd02d34a4915
Diffstat (limited to 'libutils/Unicode.cpp')
-rw-r--r-- | libutils/Unicode.cpp | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/libutils/Unicode.cpp b/libutils/Unicode.cpp index 843a81afb..3ffcf7e34 100644 --- a/libutils/Unicode.cpp +++ b/libutils/Unicode.cpp @@ -22,20 +22,6 @@ #include <log/log.h> -#if defined(_WIN32) -# undef nhtol -# undef htonl -# undef nhtos -# undef htons - -# define ntohl(x) ( ((x) << 24) | (((x) >> 24) & 255) | (((x) << 8) & 0xff0000) | (((x) >> 8) & 0xff00) ) -# define htonl(x) ntohl(x) -# define ntohs(x) ( (((x) << 8) & 0xff00) | (((x) >> 8) & 255) ) -# define htons(x) ntohs(x) -#else -# include <netinet/in.h> -#endif - extern "C" { static const char32_t kByteMask = 0x000000BF; @@ -115,24 +101,6 @@ static inline void utf32_codepoint_to_utf8(uint8_t* dstP, char32_t srcChar, size } } -size_t strlen32(const char32_t *s) -{ - const char32_t *ss = s; - while ( *ss ) - ss++; - return ss-s; -} - -size_t strnlen32(const char32_t *s, size_t maxlen) -{ - const char32_t *ss = s; - while ((maxlen > 0) && *ss) { - ss++; - maxlen--; - } - return ss-s; -} - static inline int32_t utf32_at_internal(const char* cur, size_t *num_read) { const char first_char = *cur; @@ -254,19 +222,6 @@ int strncmp16(const char16_t *s1, const char16_t *s2, size_t n) return d; } -char16_t *strcpy16(char16_t *dst, const char16_t *src) -{ - char16_t *q = dst; - const char16_t *p = src; - char16_t ch; - - do { - *q++ = ch = *p++; - } while ( ch ); - - return dst; -} - size_t strlen16(const char16_t *s) { const char16_t *ss = s; |