on builder help sign in
23 lines 606 B history raw
1-- |
2-- Module : Data.Text.Encoding.Utf32
3-- Copyright : (c) 2008, 2009 Tom Harper,
4-- (c) 2009, 2010 Bryan O'Sullivan,
5-- (c) 2009 Duncan Coutts
6--
7-- License : BSD-style
8-- Maintainer : bos@serpentine.com, rtomharper@googlemail.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 < 0xD800 || (x1 > 0xDFFF && x1 <= 0x10FFFF)
23{-# INLINE validate #-}