RosettaCodeData/Task/Binary-strings/Haskell/binary-strings-6.hs

5 lines
163 B
Haskell
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
{- 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)