I'm using Data.Text and all I could find are find
, which only takes a Char as predicate, and breakOn
, which would allow me to do what I want but seems overkill. Surely there must be a better way?
I'd be interested in the answer to the same question with other string libraries as well (String, ByteString, etc.).
刚刚找到它,答案是isInfixOf
。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.