dear-imgui-2.3.0: Haskell bindings for Dear ImGui.
Safe HaskellSafe-Inferred
LanguageHaskell2010

DearImGui.Internal.Text

Synopsis

Documentation

withCString :: MonadUnliftIO m => Text -> (CString -> m a) -> m a Source #

withCStringLen :: Text -> (CStringLen -> IO a) -> IO a #

Marshal a Text into a C string encoded as UTF-8 in temporary storage, with explicit length information. The encoded string may contain NUL bytes, and is not followed by a trailing NUL byte.

The temporary storage is freed when the subcomputation terminates (either normally or via an exception), so the pointer to the temporary storage must not be used after this function returns.

Since: text-1.0.0.0

withCStringEnd :: MonadUnliftIO m => Text -> (CString -> CString -> m a) -> m a Source #

data Text #

A space efficient, packed, unboxed Unicode text type.

Instances

Instances details
ToID Text Source # 
Instance details

Defined in DearImGui

Methods

pushID :: MonadIO m => Text -> m () Source #

Hashable Text 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Text -> Int #

hash :: Text -> Int #

Ixed Text 
Instance details

Defined in Control.Lens.At

Stream Text 
Instance details

Defined in Text.Megaparsec.Stream

Associated Types

type Token Text #

type Tokens Text #

TraversableStream Text 
Instance details

Defined in Text.Megaparsec.Stream

VisualStream Text 
Instance details

Defined in Text.Megaparsec.Stream

Pretty Text

Automatically converts all newlines to line.

>>> pretty ("hello\nworld" :: Text)
hello
world

Note that line can be undone by group:

>>> group (pretty ("hello\nworld" :: Text))
hello world

Manually use hardline if you definitely want newlines.

Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Text -> Doc ann #

prettyList :: [Text] -> Doc ann #

Chunk Text 
Instance details

Defined in Data.Attoparsec.Internal.Types

Associated Types

type ChunkElem Text #

Stream (NoShareInput Text) 
Instance details

Defined in Text.Megaparsec.Stream

Associated Types

type Token (NoShareInput Text) #

type Tokens (NoShareInput Text) #

Stream (ShareInput Text) 
Instance details

Defined in Text.Megaparsec.Stream

Associated Types

type Token (ShareInput Text) #

type Tokens (ShareInput Text) #

type Item Text 
Instance details

Defined in Data.Text

type Item Text = Char
type Index Text 
Instance details

Defined in Control.Lens.At

type Index Text = Int
type IxValue Text 
Instance details

Defined in Control.Lens.At

type Token Text 
Instance details

Defined in Text.Megaparsec.Stream

type Tokens Text 
Instance details

Defined in Text.Megaparsec.Stream

type ChunkElem Text 
Instance details

Defined in Data.Attoparsec.Internal.Types

type State Text 
Instance details

Defined in Data.Attoparsec.Internal.Types

type Token (NoShareInput Text) 
Instance details

Defined in Text.Megaparsec.Stream

type Token (ShareInput Text) 
Instance details

Defined in Text.Megaparsec.Stream

type Tokens (NoShareInput Text) 
Instance details

Defined in Text.Megaparsec.Stream

type Tokens (ShareInput Text) 
Instance details

Defined in Text.Megaparsec.Stream

pack :: String -> Text #

O(n) Convert a String into a Text. Performs replacement on invalid scalar values, so unpack . pack is not id:

>>> Data.Text.unpack (pack "\55555")
"\65533"

unpack :: Text -> String #

O(n) Convert a Text into a String.