added a notEmpty() method to String? so its polymorphic with Collection? too; its easy to tell if a string/collection is not null and not empty

This commit is contained in:
James Strachan
2012-02-24 07:04:04 +00:00
parent 5d96c8ac0d
commit 1a0467562d
+3
View File
@@ -94,6 +94,9 @@ inline fun String(stringBuffer : java.lang.StringBuffer) = java.lang.String(stri
inline fun String(stringBuilder : java.lang.StringBuilder) = java.lang.String(stringBuilder) as String
/** Returns true if the string is not null and not empty */
inline fun String?.notEmpty() : Boolean = this != null && this.length() > 0
/*
Iterator for characters of given CharSequence
*/