dear-imgui-2.2.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
Chunk Text 
Instance details

Defined in Data.Attoparsec.Internal.Types

Associated Types

type ChunkElem Text #

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

type ChunkElem Text 
Instance details

Defined in Data.Attoparsec.Internal.Types

type State Text 
Instance details

Defined in Data.Attoparsec.Internal.Types

type State Text = Buffer
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 Token Text = Char
type Tokens 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.