megaparsec-9.7.0: Monadic parser combinators

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

# Documentation

stringLength :: Traversable t => t Char -> Int Source #

Calculate length of a string taking into account the fact that certain `Char`s may span more than 1 column.

Since: 9.7.0

charLength :: Char -> Int Source #

Return 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