Cum se extrage un substring

From HaskellWiki
Revision as of 12:47, 9 October 2019 by Ha$kell (talk | contribs) (Created page with "Ori cautati o functie din biblioteca ori scrieti dvs una: <haskell> substring :: Int -> Int -> String -> String substring start end text = take (end - start) (drop start text...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Ori cautati o functie din biblioteca ori scrieti dvs una:

substring :: Int -> Int -> String -> String
substring start end text = take (end - start) (drop start text)
  • Main Data.Text> substring 2 6 "alfaville"

"favi"

  • Main Data.Text>