on master help sign in
Add isAsciiAlpha
e6d4570Harendra Kumar
src/Streamly/Internal/Data/Unicode/Char.hs+17
@@ -11,6 +11,9 @@
11--
11--
12module Streamly.Internal.Data.Unicode.Char
12module Streamly.Internal.Data.Unicode.Char
13 (
13 (
14+ -- * Predicates
15+ isAsciiAlpha
16+
14 -- * Unicode aware operations
17 -- * Unicode aware operations
15 {-
18 {-
16 toCaseFold
19 toCaseFold
@@ -21,12 +24,26 @@ module Streamly.Internal.Data.Unicode.Char
21 )
24 )
22where
25where
23
26
27+import Data.Char (isAsciiUpper, isAsciiLower)
28+
24-- import Streamly (IsStream)
29-- import Streamly (IsStream)
25
30
26-------------------------------------------------------------------------------
31-------------------------------------------------------------------------------
27-- Unicode aware operations on strings
32-- Unicode aware operations on strings
28-------------------------------------------------------------------------------
33-------------------------------------------------------------------------------
29
34
35+-- | Select alphabetic characters in the ascii character set.
36+--
37+-- /Internal/
38+--
39+{-# INLINE isAsciiAlpha #-}
40+isAsciiAlpha :: Char -> Bool
41+isAsciiAlpha c = isAsciiUpper c || isAsciiLower c
42+
43+-------------------------------------------------------------------------------
44+-- Unicode aware operations on strings
45+-------------------------------------------------------------------------------
46+
30{-
47{-
31-- |
48-- |
32-- /undefined/
49-- /undefined/