Last active
July 25, 2017 04:10
-
-
Save arodland/e69d417d7f6a3ae1a623d85c58c618c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if PERL_VERSION_GE(5,25,9) | |
#define foldit(p,e,s,l) toFOLD_utf8_safe(p,e,s,l) | |
#else | |
// toFOLD_utf8 only became a valid synonym during 5.19, but to_utf8_fold | |
// works from 5.8 through 5.24. | |
#define foldit(p,e,s,l) to_utf8_fold(p,s,l) | |
#endif | |
// called as | |
foldit(ptr, in + in_len, folded, &folded_len); | |
// where ptr is a pointer into 'in'. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment