diff options
author | Karl Williamson <khw@cpan.org> | 2016-09-25 22:04:08 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2016-09-25 22:24:20 -0600 |
commit | 8bc127bf58304a1e46a3e33d30b0b8b6f21abb07 (patch) | |
tree | e19a856cb909b92fa7bd5a7c68dd1bc2fce270b0 /embed.h | |
parent | 9f2abfdef8903cce0a7b12ce12788ce7e9f72ed1 (diff) | |
download | perl-8bc127bf58304a1e46a3e33d30b0b8b6f21abb07.tar.gz |
Add is_utf8_fixed_width_buf_flags() and use it
This encodes a simple pattern that may not be immediately obvious to
someone needing it. If you have a fixed-size buffer that is full of
purportedly UTF-8 bytes, is it valid or not? It's easy to do, as shown
in this commit. The file test operators -T and -B can be simpified by
using this function.
Diffstat (limited to 'embed.h')
-rw-r--r-- | embed.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -285,6 +285,7 @@ #define is_utf8_char Perl_is_utf8_char #define is_utf8_cntrl(a) Perl_is_utf8_cntrl(aTHX_ a) #define is_utf8_digit(a) Perl_is_utf8_digit(aTHX_ a) +#define is_utf8_fixed_width_buf_loclen_flags S_is_utf8_fixed_width_buf_loclen_flags #define is_utf8_graph(a) Perl_is_utf8_graph(aTHX_ a) #define is_utf8_idcont(a) Perl_is_utf8_idcont(aTHX_ a) #define is_utf8_idfirst(a) Perl_is_utf8_idfirst(aTHX_ a) |