diff options
author | Karl Williamson <khw@cpan.org> | 2017-06-13 21:37:22 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2017-06-14 11:08:24 -0600 |
commit | 976c1b0821cf2c6b33779dfb8e251deaee29f7bd (patch) | |
tree | 9acf9412ad51295251008ef9c2cd89b055453ab1 /utf8.h | |
parent | 23b37b1241a38c682dd4cd59cd6355024048868d (diff) | |
download | perl-976c1b0821cf2c6b33779dfb8e251deaee29f7bd.tar.gz |
Add new function utf8_from_bytes_loc()
This is currently undocumented externally, so we can change the API if
needed.
This is like utf8_from_bytes(), but in the case of not being able to
convert the whole string, it converts the initial substring that is
convertible, and tells you where it had to stop.
Diffstat (limited to 'utf8.h')
-rw-r--r-- | utf8.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1049,6 +1049,8 @@ is a valid UTF-8 character. : _is_utf8_char_helper(s, e, 0)) #define is_utf8_char_buf(buf, buf_end) isUTF8_CHAR(buf, buf_end) +#define bytes_from_utf8(s, lenp, is_utf8p) \ + bytes_from_utf8_loc(s, lenp, is_utf8p, 0) /* |