| /* ctype-style APIs. | /* ctype-style APIs. | ||||
| * | * | ||||
| * Copyright (C) 2012 Reece H. Dunn | |||||
| * Copyright (C) 2012-2013 Reece H. Dunn | |||||
| * | * | ||||
| * This file is part of ucd-tools. | * This file is part of ucd-tools. | ||||
| * | * | ||||
| case Ll: case Lm: case Lo: case Lt: case Lu: | case Ll: case Lm: case Lo: case Lt: case Lu: | ||||
| case Nd: case Nl: case No: | case Nd: case Nl: case No: | ||||
| return 1; | return 1; | ||||
| default: | |||||
| return 0; | |||||
| } | } | ||||
| return 0; | |||||
| } | } | ||||
| int ucd::isalpha(codepoint_t c) | int ucd::isalpha(codepoint_t c) | ||||
| { | { | ||||
| case Ll: case Lm: case Lo: case Lt: case Lu: | case Ll: case Lm: case Lo: case Lt: case Lu: | ||||
| return 1; | return 1; | ||||
| default: | |||||
| return 0; | |||||
| } | } | ||||
| return 0; | |||||
| } | } | ||||
| int ucd::iscntrl(codepoint_t c) | int ucd::iscntrl(codepoint_t c) | ||||
| { | { | ||||
| case Nd: case Nl: case No: | case Nd: case Nl: case No: | ||||
| return 1; | return 1; | ||||
| default: | |||||
| return 0; | |||||
| } | } | ||||
| return 0; | |||||
| } | } | ||||
| int ucd::isgraph(codepoint_t c) | int ucd::isgraph(codepoint_t c) | ||||
| case Zl: case Zp: case Zs: | case Zl: case Zp: case Zs: | ||||
| case Ii: | case Ii: | ||||
| return 0; | return 0; | ||||
| default: | |||||
| return 1; | |||||
| } | } | ||||
| return 1; | |||||
| } | } | ||||
| int ucd::islower(codepoint_t c) | int ucd::islower(codepoint_t c) | ||||
| case Cc: case Cf: case Cn: case Co: case Cs: | case Cc: case Cf: case Cn: case Co: case Cs: | ||||
| case Ii: | case Ii: | ||||
| return 0; | return 0; | ||||
| default: | |||||
| return 1; | |||||
| } | } | ||||
| return 1; | |||||
| } | } | ||||
| int ucd::ispunct(codepoint_t c) | int ucd::ispunct(codepoint_t c) | ||||
| { | { | ||||
| case Pc: case Pd: case Pe: case Pf: case Pi: case Po: case Ps: | case Pc: case Pd: case Pe: case Pf: case Pi: case Po: case Ps: | ||||
| return 1; | return 1; | ||||
| default: | |||||
| return 0; | |||||
| } | } | ||||
| return 0; | |||||
| } | } | ||||
| int ucd::isspace(codepoint_t c) | int ucd::isspace(codepoint_t c) | ||||
| case 0x85: // U+0085 : NEXT LINE | case 0x85: // U+0085 : NEXT LINE | ||||
| return 1; | return 1; | ||||
| } | } | ||||
| default: | |||||
| return 0; | |||||
| } | } | ||||
| return 0; | |||||
| } | } | ||||
| int ucd::isupper(codepoint_t c) | int ucd::isupper(codepoint_t c) |