Rename sequence function to generateSequence

This commit is contained in:
Ilya Gorbunov
2016-01-18 21:44:24 +03:00
parent 63e8865123
commit 7896e58afc
4 changed files with 36 additions and 25 deletions
+1 -1
View File
@@ -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)