blob: 34d0c3e975cb0f813a158b4344357d1465d53835 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
module Data.Char.Extended
( module Data.Char
, isAsciiLetter
, isNick
) where
import Data.Char
isAsciiLetter :: Char -> Bool
isAsciiLetter c = isAsciiUpper c || isAsciiLower c
-- RFC1459
isNick :: Char -> Bool
isNick c =
0x41 <= i && i <= 0x7D || -- letters / specials
0x30 <= i && i <= 0x39 || -- digits
0x2D == i -- minus
where
i = ord c
|