Find/split on sub-string/sequence

There are sequence/collection/string methods to find an element/character or split a container on an element or one of a set of elements. But I haven't noticed methods that split on a sub-string, like wanting to split a string on exactly CR-LF and not on either individually.

Shouldn't we add that? And a general version for sequences/collections. (I don't know if either the searched object and/or the match sub-object need to be a sequence or a collection.)

···

Sent from my iPhone

Good idea!

-Thorsten

···

Am 07.09.2017 um 09:21 schrieb Daryle Walker via swift-evolution <swift-evolution@swift.org>:

There are sequence/collection/string methods to find an element/character or split a container on an element or one of a set of elements. But I haven't noticed methods that split on a sub-string, like wanting to split a string on exactly CR-LF and not on either individually.

Shouldn't we add that? And a general version for sequences/collections. (I don't know if either the searched object and/or the match sub-object need to be a sequence or a collection.)

Sent from my iPhone
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution