1
2
3
4 :str defmodule[
5
+ - 6 +-- 44 lines: -- Predicates --
6
| 7
| 8
| 9
| 10 >>> :str use
| 11 >>> "猫" is-letter?
| 12
| 13 >>> "foo" is-lower?
| 14
| 15 >>> "FOO" is-upper?
| 16
| 17 >>> "ⅵ" is-number?
| 18
| 19 >>> "…" is-punct?
| 20
| 21 >>> "\u0308" is-mark?
| 22
| 23 >>> "€" is-symbol?
| 24
| 25 >>> "\u2028" is-sep?
| 26
| 27 >>> "\u00a0" is-space?
| 28
| 29 >>> "42" is-digit?
| 30
| 31 >>> "00a0" is-hex?
| 32
| 33 >>> "0644" is-oct?
| 34
| 35
| 36 :is-letter? [ "^\p{L}+$" =~ ] def TODO
| 37 :is-lower? [ "^\p{Ll}+$" =~ ] def
| 38 :is-upper? [ "^\p{Lu}+$" =~ ] def
| 39 :is-number? [ "^\p{N}+$" =~ ] def
| 40 :is-punct? [ "^\p{P}+$" =~ ] def
| 41 :is-mark? [ "^\p{M}+$" =~ ] def
| 42 :is-symbol? [ "^\p{S}+$" =~ ] def
| 43 :is-sep? [ "^\p{Z}+$" =~ ] def
| 44 :is-space? [ "^\p{Zs}+$" =~ ] def
| 45 :is-digit? [ "^[0-9]+$" =~ ] def
| 46 :is-hex? [ "^[0-9a-fA-F]+$" =~ ] def
| 47 :is-oct? [ "^[0-7]+$" =~ ] def
| 48
| 49
50
51 ]
52
53