| Copyright | © 2024–present Megaparsec contributors |
|---|---|
| License | FreeBSD |
| Maintainer | Mark Karpov <markkarpov92@gmail.com> |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Text.Megaparsec.Unicode
Description
Utility functions for working with Unicode.
Since: 9.7.0
Synopsis
- stringLength :: Traversable t => t Char -> Int
- charLength :: Char -> Int
- isWideChar :: Char -> Bool
- isZeroWidthChar :: Char -> Bool
Documentation
stringLength :: Traversable t => t Char -> Int Source #
Calculate the length of a string, taking into account the fact that
certain Chars may span more than 1 column.
Since: 9.7.0
charLength :: Char -> Int Source #
Return the length of an individual Char.
Since: 9.7.0
isWideChar :: Char -> Bool Source #
Determine whether the given Char is “wide”, that is, whether it spans
2 columns instead of one.
Since: 9.7.0
isZeroWidthChar :: Char -> Bool Source #
Determine whether the given Char is “zero-width”, that is, whether it
has no visible representation and does not advance the cursor position.
This includes control characters and certain Unicode zero-width
characters.
Since: 9.8.0