Simple library for utilizing the pcmpestri
SSE 4.2 instruction. A non-sse variant is provided to simplify use across platforms.
To run the test suite:
make test
Compares the case-sensitive equality of two strings.
int pcmp_eq (const uint8_t *s1, const uint8_t *s2, int n);
Compares the equality of a mixed case string to a lower case string.
int pcmp_leq (const uint8_t *s1, const uint8_t *s2, int n);
Finds the the first character matching the range string.
const uint8_t *pcmp_range (const uint8_t *cmp, int clen, const uint8_t *rng, int rlen);
The range string is a sequence of character pairs where the range is a value inclusively between the pair of characters.
Finds the the first character matching any character in the set string.
const uint8_t *pcmp_set (const uint8_t *cmp, int clen, const uint8_t *set, int slen);