Skip to content

Commit

Permalink
Add utfnext utility function
Browse files Browse the repository at this point in the history
  • Loading branch information
martanne committed Sep 15, 2015
1 parent e575957 commit fa95030
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libutf.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
/* libutf8 © 2012-2015 Connor Lane Smith <[email protected]> */
#include "libutf.h"
#include "util.h"

const char *utfnext(const char *s) {
while (!ISUTF8(*s))
s++;
return s;
}

int
runelen(Rune r)
Expand Down
2 changes: 2 additions & 0 deletions libutf.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef LIBUTF_H
#define LIBUTF_H

const char *utfnext(const char *s);

/* libutf8 © 2012-2015 Connor Lane Smith <[email protected]> */
#include <stddef.h>
#include <stdint.h>
Expand Down

0 comments on commit fa95030

Please sign in to comment.