Rename sequence function to generateSequence
This commit is contained in:
@@ -80,7 +80,7 @@ public class Regex(pattern: String, options: Set<RegexOption>) {
|
||||
|
||||
/** Returns a sequence of all occurrences of a regular expression within the [input] string, beginning at the specified [startIndex].
|
||||
*/
|
||||
public fun findAll(input: CharSequence, startIndex: Int = 0): Sequence<MatchResult> = sequence({ find(input, startIndex) }, { match -> match.next() })
|
||||
public fun findAll(input: CharSequence, startIndex: Int = 0): Sequence<MatchResult> = generateSequence({ find(input, startIndex) }, { match -> match.next() })
|
||||
|
||||
@Deprecated("Use findAll() instead.", ReplaceWith("findAll(input, startIndex)"))
|
||||
public fun matchAll(input: CharSequence, startIndex: Int = 0): Sequence<MatchResult> = findAll(input, startIndex)
|
||||
|
||||
Reference in New Issue
Block a user