diff options
Diffstat (limited to 'src/utf.hh')
| -rw-r--r-- | src/utf.hh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/utf.hh b/src/utf.hh new file mode 100644 index 0000000..7625b1b --- /dev/null +++ b/src/utf.hh @@ -0,0 +1,14 @@ +// -*- mode: c++; c-basic-offset: 2; -*- + +#ifndef UTF_HH +#define UTF_HH + +#include <string> + +char* read_utf8(char const* in, size_t max, uint32_t* out); + +bool valid_utf8(std::string const& str, size_t start = 0, + size_t len = std::string::npos); +bool valid_utf8(char const* str, size_t len = std::string::npos); + +#endif // UTF_HH |
