Closed codecat closed 8 years ago
I think all the ints need to become longs, but apart from that the code is great thanks!
The closed issue #10 gave some justification for int -> long.
On which compilers is it 16 bit? There were other places where codepoints were passed as ints.
On gcc 64 bit, long
is a 64 bit integer. How about using stdint.h
so int32_t
can be used instead?
@angelog I had some notion to support VS11 which didn't have stdint, but we could do better than long aye.
I have code in utest.h that does;
#if defined(_MSC_VER)
#define int64_t __int64
#define uint64_t unsigned __int64
#else
#include <stdint.h>
#endif
We could bring that over and make them 32 instead of 64?
I like that idea! I've added it to the PR.
As discussed earlier in #25, I didn't mark these as "complete" in the readme because they really only cover the
A-Za-z
range.utf8islower
is dumb and only returns0
for every codepoint in theA-Z
range.The upside is that we can use these functions on any utf-8 string or codepoint and they will include any ascii characters.
Thoughts?