Implement CharSequence.isEmpty method in stdlib.js. Remove corresponding intrinsic.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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]+$")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user