final class StringOps extends AnyVal

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StringOps
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new StringOps(str: String)

Value Members

  1. def ensurePrefix(prefix: String): String
  2. def ensureSuffix(suffix: String): String
  3. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  4. def orEmpty: String

    Makes sure that String value is not null by replacing null with empty string.

  5. def uncapitalize: String
  6. 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. becomes My 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.