diff options
author | Karl Williamson <khw@cpan.org> | 2016-12-18 18:05:46 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2016-12-23 22:36:34 -0700 |
commit | a239b1e291a3367448da17ea47c2f2aca5a07b69 (patch) | |
tree | aac2013dd71f03ada8fbc27a1aea90334e540989 /utf8.h | |
parent | 042d9e5039128be63013ec1b4e120e4b3cebc48c (diff) | |
download | perl-a239b1e291a3367448da17ea47c2f2aca5a07b69.tar.gz |
Add toFOO_utf8_safe() macros
Diffstat (limited to 'utf8.h')
-rw-r--r-- | utf8.h | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -76,10 +76,15 @@ the string is invariant. utf8n_to_uvchr_error(s, len, lenp, flags, 0) #define to_uni_fold(c, p, lenp) _to_uni_fold_flags(c, p, lenp, FOLD_FLAGS_FULL) -#define to_utf8_fold(c, p, lenp) _to_utf8_fold_flags(c, p, lenp, FOLD_FLAGS_FULL) -#define to_utf8_lower(a,b,c) _to_utf8_lower_flags(a,b,c,0) -#define to_utf8_upper(a,b,c) _to_utf8_upper_flags(a,b,c,0) -#define to_utf8_title(a,b,c) _to_utf8_title_flags(a,b,c,0) + +#define to_utf8_fold(s, r, lenr) \ + _to_utf8_fold_flags (s, NULL, r, lenr, FOLD_FLAGS_FULL) +#define to_utf8_lower(s, r, lenr) \ + _to_utf8_lower_flags(s, NULL, r ,lenr, 0) +#define to_utf8_upper(s, r, lenr) \ + _to_utf8_upper_flags(s, NULL, r, lenr, 0) +#define to_utf8_title(s, r, lenr) \ + _to_utf8_title_flags(s, NULL, r, lenr ,0) #define foldEQ_utf8(s1, pe1, l1, u1, s2, pe2, l2, u2) \ foldEQ_utf8_flags(s1, pe1, l1, u1, s2, pe2, l2, u2, 0) |