diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-09-15 09:06:33 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-09-15 09:09:15 +0200 |
| commit | fa950307aeb2a060be72fc73e0017e5497cb4ace (patch) | |
| tree | c7390ae9a6051c0e8f812ee0e31af0ccf507fd58 | |
| parent | e57595741285eebf1aac2f2ceac19cae5d949612 (diff) | |
| download | vis-fa950307aeb2a060be72fc73e0017e5497cb4ace.tar.gz vis-fa950307aeb2a060be72fc73e0017e5497cb4ace.tar.xz | |
Add utfnext utility function
| -rw-r--r-- | libutf.c | 7 | ||||
| -rw-r--r-- | libutf.h | 2 |
2 files changed, 9 insertions, 0 deletions
@@ -1,5 +1,12 @@ /* libutf8 © 2012-2015 Connor Lane Smith <cls@lubutu.com> */ #include "libutf.h" +#include "util.h" + +const char *utfnext(const char *s) { + while (!ISUTF8(*s)) + s++; + return s; +} int runelen(Rune r) @@ -1,6 +1,8 @@ #ifndef LIBUTF_H #define LIBUTF_H +const char *utfnext(const char *s); + /* libutf8 © 2012-2015 Connor Lane Smith <cls@lubutu.com> */ #include <stddef.h> #include <stdint.h> |
