XString extension

on

Properties

camelCase String

Available on String?, provided by the XString extension

convert to camel case format: foo bar -> FooBar, or an empty string if it is blank
no setter
first String

Available on String?, provided by the XString extension

no setter
idField String

Available on String?, provided by the XString extension

no setter
initials String

Available on String?, provided by the XString extension

convert to initials: Foo Bar -> FB, or an empty string if this is blank
no setter
isBlank bool

Available on String?, provided by the XString extension

true if this is null (including the string 'null'), empty or consists of only whitespace characters
no setter
isDigit bool

Available on String?, provided by the XString extension

true if this is non-null, non-empty and consists of only digits: 0-9
no setter
isEmptyOrNull bool

Available on String?, provided by the XString extension

true if this is null, or empty
no setter
isLetter bool

Available on String?, provided by the XString extension

true if this is non-null, non-empty and consists of only letters: a-zA-Z
no setter
isLetterOrDigit bool

Available on String?, provided by the XString extension

true if this is non-null, non-empty and consists of only letters or digits: 0-9a-zA-Z
no setter
isNotBlank bool

Available on String?, provided by the XString extension

no setter
isUpperCase bool

Available on String?, provided by the XString extension

true if this is non-null, non-empty and consists of only upper case letters: A-Z
no setter
last String

Available on String?, provided by the XString extension

no setter
size int

Available on String?, provided by the XString extension

no setter
titleized String

Available on String?, provided by the XString extension

convert to 'title' format: foo bar -> Foo Bar, or an empty string if it is blank. similar to camelCase, but each segment is separated by a space
no setter
underscored String

Available on String?, provided by the XString extension

convert to underscored format: FooBar -> foo_bar
no setter
varName String

Available on String?, provided by the XString extension

convert to a standard variable name format: foo bar -> fooBar. similar to camelCase, but starting with a lowercase character
no setter

Methods

orElse(String string) String

Available on String?, provided by the XString extension

return the given string if this is null
orIfBlank(String string) String

Available on String?, provided by the XString extension

return the given string if this is blank
prefix(String? prefix) String?

Available on String?, provided by the XString extension

separated(String separator) String

Available on String?, provided by the XString extension

skip(int count) String

Available on String?, provided by the XString extension

slice(int start, [int? end]) String

Available on String?, provided by the XString extension

suffix(String? suffix) String?

Available on String?, provided by the XString extension

take(int count) String

Available on String?, provided by the XString extension

times(int count, {String separator = ''}) String

Available on String?, provided by the XString extension