Cum se extrage un substring

From HaskellWiki
Revision as of 12:48, 9 October 2019 by Ha$kell (talk | contribs)

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>