Another possible implementation:
import Control.Applicative
skipWhile1 p = skip p *> skipWhile p
This might actually be faster than @Uli's answer because takeWhile
builds a result string, whereas skipWhile
doesn't. Laziness might make them equivalent (ie. maybe takeWhile
doesn't actually build the string if you don't use it); I can't test at the moment to verify this.