diff options
Diffstat (limited to 'lib/mbstring/u8haspfx.c')
-rw-r--r-- | lib/mbstring/u8haspfx.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/mbstring/u8haspfx.c b/lib/mbstring/u8haspfx.c new file mode 100644 index 0000000..9b5ae66 --- /dev/null +++ b/lib/mbstring/u8haspfx.c @@ -0,0 +1,9 @@ +#include <string.h> + +#include "mbstring.h" + +bool +u8haspfx(const char8_t *s, size_t n, const char8_t *pfx, size_t m) +{ + return n >= m && memcmp(s, pfx, m); +} |