You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Swift's standard library should provide a protocol that searching-like functionality can conform to, to allow for many implementations that can fulfill find/replace/split/trim/etc. This would likely be something analogous to Rust's Needle (formerly str::Pattern) https://github.com/rust-lang/rfcs/blob/master/text/2500-needle.md.
Some potential conformers to this protocol (using String for an example in parens):
`Collection.Element` (find a Character)
`Set<Collection.Element>` (any of a choice of Characters)
`(Collection.Element) -> Bool` (predicate version / generalization of above 3)
`S: Sequence where S.Element == Collection.Element` (find a substring)
`Regex` (regular expression matches)
`PEG` (parses)
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: a77fc420964e7e03cb2f70ba3aeb3a2a
Parent-Task:
Issue Description:
Swift's standard library should provide a protocol that searching-like functionality can conform to, to allow for many implementations that can fulfill find/replace/split/trim/etc. This would likely be something analogous to Rust's Needle (formerly str::Pattern) https://github.com/rust-lang/rfcs/blob/master/text/2500-needle.md.
Some potential conformers to this protocol (using String for an example in parens):
`Collection.Element` (find a Character)
`Set<Collection.Element>` (any of a choice of Characters)
`(Collection.Element) -> Bool` (predicate version / generalization of above 3)
`S: Sequence where S.Element == Collection.Element` (find a substring)
`Regex` (regular expression matches)
`PEG` (parses)
The text was updated successfully, but these errors were encountered: