on 0.4 help sign in
23 lines 617 B history raw
1-- |
2-- Module : Data.Text.Encoding.Utf16
3-- Copyright : (c) Tom Harper 2008-2009,
4-- (c) Bryan O'Sullivan 2009,
5-- (c) Duncan Coutts 2009
6--
7-- License : BSD-style
8-- Maintainer : rtharper@aftereternity.co.uk, bos@serpentine.com,
9-- duncan@haskell.org
10-- Stability : experimental
11-- Portability : portable
12--
13-- Basic UTF-32 validation.
14module Data.Text.Encoding.Utf32
15 (
16 validate
17 ) where
19import Data.Word (Word32)
21validate :: Word32 -> Bool
22validate x1 = (x1 >= 0x0 && x1 < 0xD800) || (x1 > 0xDFFF && x1 <= 0x10FFFF)
23{-# INLINE validate #-}