00001 /* 00002 * squareball: A general-purpose library for C99. 00003 * Copyright (C) 2014-2018 Rafael G. Martins <rafael@rafaelmartins.eng.br> 00004 * 00005 * This program can be distributed under the terms of the BSD License. 00006 * See the file LICENSE. 00007 */ 00008 00009 #ifndef _SQUAREBALL_UTF8_H 00010 #define _SQUAREBALL_UTF8_H 00011 00012 #include <stdbool.h> 00013 #include <stddef.h> 00014 #include <stdint.h> 00015 #include "sb-string.h" 00016 00030 bool sb_utf8_validate(const uint8_t *str, size_t len); 00031 00038 bool sb_utf8_validate_str(sb_string_t *str); 00039 00047 size_t sb_utf8_bom_length(const uint8_t *str, size_t len); 00048 00049 #endif /* _SQUAREBALL_UTF8_H */