final class StringOps extends AnyVal
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- StringOps
- AnyVal
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
- new StringOps(str: String)
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 ensurePrefix(prefix: String): String
- def ensureSuffix(suffix: String): String
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
orEmpty: String
Makes sure that
String
value is notnull
by replacingnull
with empty string. -
def
toString(): String
- Definition Classes
- Any
- def uncapitalize: String
-
def
unwrapLines: String
Removes a newline character from every sequence of consecutive newline characters.
Removes a newline character from every sequence of consecutive newline characters. If the sequence contained just one newline character without any whitespace before and after it, a space is inserted.
e.g.
My hovercraft\nis full of eels.\n\nMy hovercraft is\n full of eels.
becomesMy hovercraft is full of eels.\nMy hovercraft is full of eels.
Useful for multi-line string literals with lines wrapped in source code but without intention of including these line breaks in actual runtime string.