Rename Pattern to Regex.
toRegex now converts string to our regex, and toPattern converts to JVM Pattern.
This commit is contained in:
@@ -5,8 +5,8 @@ import kotlin.test.*
|
||||
import org.junit.Test as test
|
||||
|
||||
class StringUtilTest() {
|
||||
test fun toRegex() {
|
||||
val re = """foo""".toRegex()
|
||||
test fun toPattern() {
|
||||
val re = """foo""".toPattern()
|
||||
val list = re.split("hellofoobar").toList()
|
||||
assertEquals(listOf("hello", "bar"), list)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user