Add ImString#isEmpty and ImString#isNotEmpty methods
This commit is contained in:
1 parent
9d4d372e03
commit
b9f5e5315e
1 file changed
+14
@@ -143,6 +143,20 @@ public final class ImString implements Cloneable {
|
|||||||
return data.length;
|
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
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return get();
|
return get();
|
||||||
|
|||||||
Reference in new issue
Block a user