Remove Regex() and toRegex() overloads with vararg options. Now only zero, one or set of options are allowed.

This commit is contained in:
Ilya Gorbunov
2015-04-16 19:23:52 +03:00
parent 44d7f768c7
commit 81325208be
4 changed files with 24 additions and 10 deletions
+7 -4
View File
@@ -153,10 +153,13 @@ public class Regex(pattern: String, options: Set<RegexOption>) {
}
}
/**
* Creates a regular expression from the specified [pattern] string and the specified [options].
*/
public fun Regex(pattern: String, vararg options: RegexOption): Regex = Regex(pattern, options.toSet())
/** Creates a regular expression from the specified [pattern] string and the specified single [option]. */
public fun Regex(pattern: String, option: RegexOption): Regex = Regex(pattern, setOf(option))
/** Creates a regular expression from the specified [pattern] string and the default options. */
public fun Regex(pattern: String): Regex = Regex(pattern, emptySet())
private fun RegExp.findNext(input: String, from: Int): MatchResult? {