Add samples for is(|Not|NullOr)Empty and is(|Not|NullOr)Blank functions

This commit is contained in:
Ilya Gorbunov
2019-03-12 21:35:42 +03:00
parent ed878be1f7
commit 6bc7c06038
3 changed files with 88 additions and 1 deletions
@@ -351,6 +351,8 @@ public inline fun String.intern(): String = (this as java.lang.String).intern()
/**
* Returns `true` if this string is empty or consists solely of whitespace characters.
*
* @sample samples.text.Strings.stringIsBlank
*/
public actual fun CharSequence.isBlank(): Boolean = length == 0 || indices.all { this[it].isWhitespace() }