XString extension Null safety

on

Properties

camelCase String
convert to camel case format: foo bar -> FooBar, or an empty string if it is blank
read-only
first String
read-only
idField String
read-only
initials String
convert to initials: Foo Bar -> FB, or an empty string if this is blank
read-only
isBlank bool
true if this is null (including the string 'null'), empty or consists of only whitespace characters
read-only
isDigit bool
true if this is non-null, non-empty and consists of only digits: 0-9
read-only
isEmptyOrNull bool
true if this is null, or empty
read-only
isLetter bool
true if this is non-null, non-empty and consists of only letters: a-zA-Z
read-only
isLetterOrDigit bool
true if this is non-null, non-empty and consists of only letters or digits: 0-9a-zA-Z
read-only
isNotBlank bool
read-only
isUpperCase bool
true if this is non-null, non-empty and consists of only upper case letters: A-Z
read-only
last String
read-only
size int
read-only
titleized String
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
read-only
underscored String
convert to underscored format: FooBar -> foo_bar
read-only
varName String
convert to a standard variable name format: foo bar -> fooBar. similar to camelCase, but starting with a lowercase character
read-only

Methods

orElse(String string) String
return the given string if this is null
orIfBlank(String string) String
return the given string if this is blank
prefix(String? prefix) String?
separated(String separator) String
skip(int count) String
slice(int start, [int? end]) String
suffix(String? suffix) String?
take(int count) String