diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-12-23 13:49:02 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-12-23 14:05:28 -0700 |
commit | eba68aa09a0b159ee4eef3cee1bd58ee95fdb81a (patch) | |
tree | 4a3fd382c4ba851804dfbe58044b6d96ed20ed28 /utf8.c | |
parent | 31a09021a5558064a4417036c917712e2435edf7 (diff) | |
download | perl-eba68aa09a0b159ee4eef3cee1bd58ee95fdb81a.tar.gz |
handy.h: Add full complement of isIDCONT() macros
This also changes isIDCONT_utf8() to use the Perl definition, which
excludes any \W characters (the Unicode definition includes a few of
these). Tests are also added. These macros remain undocumented for
now.
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -1528,6 +1528,14 @@ Perl_is_uni_idfirst(pTHX_ UV c) } bool +Perl__is_uni_perl_idcont(pTHX_ UV c) +{ + U8 tmpbuf[UTF8_MAXBYTES+1]; + uvchr_to_utf8(tmpbuf, c); + return _is_utf8_perl_idcont(tmpbuf); +} + +bool Perl__is_uni_perl_idstart(pTHX_ UV c) { U8 tmpbuf[UTF8_MAXBYTES+1]; @@ -2120,6 +2128,17 @@ Perl__is_utf8_perl_idstart(pTHX_ const U8 *p) } bool +Perl__is_utf8_perl_idcont(pTHX_ const U8 *p) +{ + dVAR; + + PERL_ARGS_ASSERT__IS_UTF8_PERL_IDCONT; + + return is_utf8_common(p, &PL_utf8_perl_idcont, "_Perl_IDCont"); +} + + +bool Perl_is_utf8_idcont(pTHX_ const U8 *p) { dVAR; |