hledger-lib-1.41: A library providing the core functionality of hledger

Safe Haskell | Safe-Inferred
Language | Haskell2010

Text.WideString

Contents

- Text Builders which keep track of length

Description

Calculate the width of String and Text, being aware of wide characters.

Synopsis

- data WideBuilder = WideBuilder {
  - wbBuilder :: !Builder
  - wbWidth :: !Int
  }
- wbUnpack :: WideBuilder -> String
- wbToText :: WideBuilder -> Text
- wbFromText :: Text -> WideBuilder

# Text Builders which keep track of length

data WideBuilder #

Helper for constructing Builders while keeping track of text width.

Constructors

WideBuilder |
Fields wbBuilder :: !Builder wbWidth :: !Int

#### Instances

Instances details

Monoid WideBuilder # |
Instance details Defined in Text.WideString Methods mempty :: WideBuilder # mappend :: WideBuilder -> WideBuilder -> WideBuilder # mconcat :: [WideBuilder] -> WideBuilder #
Semigroup WideBuilder # |
Instance details Defined in Text.WideString Methods (<>) :: WideBuilder -> WideBuilder -> WideBuilder # sconcat :: NonEmpty WideBuilder -> WideBuilder # stimes :: Integral b => b -> WideBuilder -> WideBuilder #
Show WideBuilder # |
Instance details Defined in Text.WideString Methods showsPrec :: Int -> WideBuilder -> ShowS # show :: WideBuilder -> String # showList :: [WideBuilder] -> ShowS #

wbUnpack :: WideBuilder -> String #

Convert a WideBuilder to a String.

wbToText :: WideBuilder -> Text #

Convert a WideBuilder to a strict Text.

wbFromText :: Text -> WideBuilder #

Convert a strict Text to a WideBuilder.