RString extension
- on
Properties
- capitalize → String
-
Available on String, provided by the RString extension
Uppercase first letter inside each word in string Example:your name => Your Name
no setter - capitalizeFirst → String
-
Available on String, provided by the RString extension
Uppercase first letter inside string and let the others lowercase Example:your name => Your name
no setter - isPalindrome → bool
-
Available on String, provided by the RString extension
Checks if string is Palindrome.no setter - lastOrEmpty → String
-
Available on String, provided by the RString extension
Returns last symbol of string or empty string ifthis
is null or emptyno setter - lastOrNull → String?
-
Available on String, provided by the RString extension
- return the last character
- return
null
if isEmptyno setter - linesCount → int
-
Available on String, provided by the RString extension
return string lines countno setter - reversed → String
-
Available on String, provided by the RString extension
Reverse a stringno setter
Methods
-
anyChar(
bool predicate(String element)) → bool -
Available on String, provided by the RString extension
Returnstrue
if at least one element matches the givenpredicate
. thepredicate
should have only one character -
replaceAfter(
String delimiter, String replacement, [String? defaultValue]) → String -
Available on String, provided by the RString extension
Replaces part of string after the first occurrence of given delimiter with thereplacement
string. If the string does not contain the delimiter, returnsdefaultValue
which defaults to the original string. -
replaceBefore(
String delimiter, String replacement, [String? defaultValue]) → String -
Available on String, provided by the RString extension
Replaces part of string before the first occurrence of given delimiter with thereplacement
string. If the string does not contain the delimiter, returnsmissingDelimiterValue!
which defaults to the original string.