Source

text / Text / Utf32.hs

1
2
3
4
5
6
7
8
module Text.Utf32 where

import Data.Bits
import Char
import Data.Word

validate    :: Word32 -> Bool
validate x1 = (x1 >= 0x0 && x1 < 0xD800) || (x1 > 0xDFFF && x1 <= 0x10FFFF)