Cclassclass IsText t whereSourcePeek#Traversals for strict or lazy TextMethodspacked :: Iso' String tThis isomorphism can be used to pack (or unpack) strict or lazy Text.pack x ≡ x ^. packed unpack x ≡ x ^. from packed packed ≡ from unpacked builder :: Iso' t BuilderConvert between strict or lazy Text and a Builder.fromText x ≡ x ^. builder text :: IndexedTraversal' Int t CharTraverse the individual characters in strict or lazy Text.text = unpacked . traversed Instances3IsTextIsText StringDefined in lens-5.3.6 · Data.Text.LensIsText TextDefined in lens-5.3.6 · Data.Text.LensIsText TextDefined in lens-5.3.6 · Data.Text.Lens
vvalueunpacked :: IsText t => Iso' t StringSourcePeek#This isomorphism can be used to unpack (or pack) both strict or lazy Text.unpack x ≡ x ^. unpacked pack x ≡ x ^. from unpacked This Iso is provided for notational convenience rather than out of great need, sinceunpacked ≡ from packed
vvalue_Text :: IsText t => Iso' t StringSourcePeek#This is an alias for unpacked that makes it clearer how to use it with (#)._Text = from packed Example1 expression>>> _Text # "hello" :: Strict.Text"hello"