on master help sign in
Add isAsciiAlpha
commite6d4570ccd6bb3186778c5eda701e13f23121cbb authorHarendra Kumar <harendra@composewell.com> dateThu 9 Apr 2020, 00:39 (7 years ago) parent007343a
1 file changed+17
src/Streamly/Internal/Data/Unicode/Char.hs+17
src/Streamly/Internal/Data/Unicode/Char.hs+17
@@ -11,6 +11,9 @@
1111--
1212module Streamly.Internal.Data.Unicode.Char
1313 (
14+ -- * Predicates
15+ isAsciiAlpha
16+
1417 -- * Unicode aware operations
1518 {-
1619 toCaseFold
@@ -21,12 +24,26 @@ module Streamly.Internal.Data.Unicode.Char
2124 )
2225where
2326
27+import Data.Char (isAsciiUpper, isAsciiLower)
28+
2429-- import Streamly (IsStream)
2530
2631-------------------------------------------------------------------------------
2732-- Unicode aware operations on strings
2833-------------------------------------------------------------------------------
2934
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+
3047{-
3148-- |
3249-- /undefined/