Difference between revisions of "Cum se extrage un substring"
Jump to navigation
Jump to search
(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...") |
m |
||
(One intermediate revision by the same user not shown) | |||
Line 6: | Line 6: | ||
</haskell> |
</haskell> |
||
− | + | Main Data.Text> substring 2 6 "alfaville" <br> |
|
+ | "favi" <br> |
||
− | "favi" |
||
− | + | Main Data.Text> |
Latest revision as of 12:48, 9 October 2019
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>