implicit final class RichString extends AnyVal
Implicit class that adds case handling methods to the standard String
type.
These methods enable expressive and locale-sensitive operations.
- Alphabetic
- By Inheritance
- RichString
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
RichString(s: String)
- s
the input string to be enhanced
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
def
isCapitalize(implicit locale: Locale): Boolean
Checks if the string is in capitalized form (first character uppercase, rest lowercase).
Checks if the string is in capitalized form (first character uppercase, rest lowercase).
- locale
the locale to apply case rules from
- returns
true if the string is capitalized, false otherwise
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isLowerCase(implicit locale: Locale): Boolean
Checks if the string is entirely in lowercase according to the given locale.
Checks if the string is entirely in lowercase according to the given locale.
- locale
the locale to apply case rules from
- returns
true if the string is in lowercase, false otherwise
-
def
isTitleCase(implicit locale: Locale): Boolean
Checks if the string is in title case (each word starts with an uppercase letter, the rest lowercase).
Checks if the string is in title case (each word starts with an uppercase letter, the rest lowercase).
- locale
the locale to apply case rules from
- returns
true if the string is in title case, false otherwise
-
def
isUpperCase(implicit locale: Locale): Boolean
Checks if the string is entirely in uppercase according to the given locale.
Checks if the string is entirely in uppercase according to the given locale.
- locale
the locale to apply case rules from
- returns
true if the string is in uppercase, false otherwise
- val s: String
-
def
toCapitalize(implicit locale: Locale): String
Converts the string to capitalized form (first character uppercase, rest lowercase).
Converts the string to capitalized form (first character uppercase, rest lowercase).
- locale
the locale to apply case rules from
- returns
the capitalized string
-
def
toLowerCaseRich(implicit locale: Locale): String
Converts the string to lowercase using the given locale.
Converts the string to lowercase using the given locale.
- locale
the locale to apply case rules from
- returns
the lowercased string
-
def
toString(): String
- Definition Classes
- Any
-
def
toTitleCase(implicit locale: Locale): String
Converts the string to title case (each word starts with an uppercase letter, the rest lowercase).
Converts the string to title case (each word starts with an uppercase letter, the rest lowercase).
- locale
the locale to apply case rules from
- returns
the title-cased string
-
def
toUpperCaseRich(implicit locale: Locale): String
Converts the string to uppercase using the given locale.
Converts the string to uppercase using the given locale.
- locale
the locale to apply case rules from
- returns
the upper-cased string