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 if this is null or empty
no setter
lastOrNull String?

Available on String, provided by the RString extension

  • return the last character
  • return null if isEmpty
  • no setter
    linesCount int

    Available on String, provided by the RString extension

    return string lines count
    no setter
    reversed String

    Available on String, provided by the RString extension

    Reverse a string
    no setter

    Methods

    anyChar(bool predicate(String element)) bool

    Available on String, provided by the RString extension

    Returns true if at least one element matches the given predicate. the predicate 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 the replacement string. If the string does not contain the delimiter, returns defaultValue 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 the replacement string. If the string does not contain the delimiter, returns missingDelimiterValue! which defaults to the original string.