Rename methods in Regex. Add matchEntire method to match entire string against regex.

This commit is contained in:
Ilya Gorbunov
2015-10-14 07:44:19 +03:00
parent d860f335a3
commit d1d865aa0f
7 changed files with 80 additions and 26 deletions
+1 -1
View File
@@ -664,7 +664,7 @@ ${" "}
""".trimIndent()
assertEquals(23, deindented.lines().size())
val indents = deindented.lines().map { "^\\s*".toRegex().match(it)!!.value.length }
val indents = deindented.lines().map { "^\\s*".toRegex().find(it)!!.value.length }
assertEquals(0, indents.min())
assertEquals(42, indents.max())
assertEquals(1, deindented.lines().count { it.isEmpty() })