Skip to content

Latest commit

 

History

History
35 lines (20 loc) · 630 Bytes

Unsafe.md

File metadata and controls

35 lines (20 loc) · 630 Bytes

Module Data.String.Unsafe

Unsafe string and character functions.

charCodeAt

charCodeAt :: Int -> String -> Int

Returns the numeric Unicode value of the character at the given index.

Unsafe: throws runtime exception if the index is out of bounds.

charAt

charAt :: Int -> String -> Char

Returns the character at the given index.

Unsafe: throws runtime exception if the index is out of bounds.

char

char :: String -> Char

Converts a string of length 1 to a character.

Unsafe: throws runtime exception if length is not 1.