Updating built in Io code to use += instead of x = x + y
[io/quag.git] / libs / basekit / source / UArray_character.c
blob6b66ce936e0841e315fa03a88b6b51e4b0fffeda
1 /*
2 copyright: Steve Dekorte, 2006. All rights reserved.
3 license: See _BSDLicense.txt.
4 */
6 #include "UArray.h"
7 #include <math.h>
9 // set
11 #define UARRAY_IOP(OP) \
12 void UArray_ ## OP (UArray *self) { UARRAY_FOREACHASSIGN(self, i, v, OP((int)v)); }
14 UARRAY_IOP(isalnum);
15 UARRAY_IOP(isalpha);
16 UARRAY_IOP(iscntrl);
17 UARRAY_IOP(isdigit);
18 UARRAY_IOP(isgraph);
19 UARRAY_IOP(islower);
20 UARRAY_IOP(isprint);
21 UARRAY_IOP(ispunct);
22 UARRAY_IOP(isspace);
23 UARRAY_IOP(isupper);
24 UARRAY_IOP(isxdigit);
26 UARRAY_IOP(tolower);
27 UARRAY_IOP(toupper);
29 BASEKIT_API int UArray_isLowercase(UArray *self)
31 UARRAY_INTFOREACH(self, i, v, if(v != tolower(v)) return 0);
32 return 1;
35 BASEKIT_API int UArray_isUppercase(UArray *self)
37 UARRAY_INTFOREACH(self, i, v, if(v != toupper(v)) return 0);
38 return 1;