Add ImString#isEmpty and ImString#isNotEmpty methods

This commit is contained in:
SpaiR committed 2020-08-06 13:28:05 +03:00
1 parent 9d4d372e03
commit b9f5e5315e
1 file changed
+14
@@ -143,6 +143,20 @@ public final class ImString implements Cloneable {
return data.length;
}
/**
* @return true if the length of the text inside of the data buffer is 0
*/
public boolean isEmpty() {
return getLength() == 0;
}
/**
* @return true if the length of the text inside of the data buffer is not 0
*/
public boolean isNotEmpty() {
return !isEmpty();
}
@Override
public String toString() {
return get();