Implement CharSequence.isEmpty method in stdlib.js. Remove corresponding intrinsic.

This commit is contained in:
Ilya Gorbunov
2015-04-15 16:20:34 +03:00
parent 7a51123d26
commit 6c9ca39286
4 changed files with 1 additions and 13 deletions
-2
View File
@@ -48,8 +48,6 @@ native public fun String.match(regex : String) : Array<String> = noImpl
native("length")
public val CharSequence.size: Int get() = noImpl
library
public fun CharSequence.isEmpty(): Boolean = noImpl
+1
View File
@@ -43,6 +43,7 @@ public inline fun String.matches(regex : String) : Boolean {
return result != null && result.size() > 0
}
public inline fun CharSequence.isEmpty(): Boolean = this.length() == 0
public fun String.isBlank(): Boolean = length() == 0 || matches("^[\\s\\xA0]+$")