RosettaCodeData/Task/Binary_strings/Haskell/binary_strings-6.hs
Ingy döt Net 80737d5a6a new tasks
2013-04-09 00:46:50 -07:00

4 lines
163 B
Haskell

{- Take a certain substring, specified by
two integers, from the given string -}
strPull :: Int -> Int -> String -> String
strPull x y s = take (y-x+1) (drop x s)