Packages

implicit final class StringOps extends AnyVal

Extension methods for String.

Annotations
@SuppressWarnings()
Source
string.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StringOps
  2. AnyVal
  3. Any
Implicitly
  1. by AnyOps
  2. by any2stringadd
  3. by StringFormat
  4. by Ensuring
  5. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new StringOps(value: String)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from StringOps to any2stringadd[StringOps] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (StringOps, B)
    Implicit
    This member is added by an implicit conversion from StringOps to ArrowAssoc[StringOps] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. def /(pathname: String): File

    Creates a new File instance from this value and a child pathname string.

    Creates a new File instance from this value and a child pathname string.

    pathname

    the child pathname, either a directory or a file

    returns

    the new File instance from this input text and a child pathname string

    Annotations
    @inline()
  6. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  7. def asBoolean: Option[Boolean]

    Typesafe alternative to toBoolean.

    Typesafe alternative to toBoolean.

    returns

    if the input text is parseable as boolean, an option containing it; None otherwise

  8. def asByte: Option[Byte]

    Typesafe alternative to toByte.

    Typesafe alternative to toByte.

    returns

    if the input text is parseable as byte, an option containing it; None otherwise

  9. def asDouble: Option[Double]

    Typesafe alternative to toDouble.

    Typesafe alternative to toDouble.

    returns

    if the input text is parseable as double, an option containing it; None otherwise

  10. def asFloat: Option[Float]

    Typesafe alternative to toFloat.

    Typesafe alternative to toFloat.

    returns

    if the input text is parseable as float, an option containing it; None otherwise

  11. def asInputStream: InputStream

    Creates a InputStream backed by this input text using the UTF-8 charset.

    Creates a InputStream backed by this input text using the UTF-8 charset.

    returns

    the InputStream backed by this input text

    Annotations
    @inline()
  12. def asInputStream(cs: Charset = utf8): InputStream

    Creates a InputStream backed by this input text.

    Creates a InputStream backed by this input text.

    cs

    the Charset to be used to encode the input text

    returns

    the InputStream backed by this input text

    Annotations
    @inline()
  13. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  14. def asInt: Option[Int]

    Typesafe alternative to toInt.

    Typesafe alternative to toInt.

    returns

    if the input text is parseable as int, an option containing it; None otherwise

  15. def asLong: Option[Long]

    Typesafe alternative to toLong.

    Typesafe alternative to toLong.

    returns

    if the input text is parseable as long, an option containing it; None otherwise

  16. def asShort: Option[Short]

    Typesafe alternative to toShort.

    Typesafe alternative to toShort.

    returns

    if the input text is parseable as short, an option containing it; None otherwise

  17. def constantTimeEquals(that: String, cs: Charset = utf8): Boolean

    Compares two strings for equality using a constant time simple byte compare.

    Compares two strings for equality using a constant time simple byte compare.

    that

    the string to compare to

    cs

    the CharSet to be used for the comparison (defaults to UTF-8)

    returns

    true if both strings are equal, false otherwise

    Annotations
    @inline()
  18. def ensuring(cond: (StringOps) ⇒ Boolean, msg: ⇒ Any): StringOps
    Implicit
    This member is added by an implicit conversion from StringOps to Ensuring[StringOps] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  19. def ensuring(cond: (StringOps) ⇒ Boolean): StringOps
    Implicit
    This member is added by an implicit conversion from StringOps to Ensuring[StringOps] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. def ensuring(cond: Boolean, msg: ⇒ Any): StringOps
    Implicit
    This member is added by an implicit conversion from StringOps to Ensuring[StringOps] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. def ensuring(cond: Boolean): StringOps
    Implicit
    This member is added by an implicit conversion from StringOps to Ensuring[StringOps] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  22. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from StringOps to StringFormat[StringOps] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  23. def future: Future[StringOps]

    Creates an already completed Future containing value.

    Creates an already completed Future containing value.

    returns

    the already completed Future with the specified result

    Implicit
    This member is added by an implicit conversion from StringOps to AnyOps[StringOps] performed by method AnyOps in scail.commons.ops.
    Definition Classes
    AnyOps
    Annotations
    @inline()
  24. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  25. def isBlank: Boolean

    Checks whether the input text is empty (""), null or whitespace-only.

    Checks whether the input text is empty (""), null or whitespace-only.

    returns

    true if the input text is null, empty or whitespace only, false otherwise

    Annotations
    @inline()
  26. def isFalsy: Boolean

    Whether the input text is one of "n", "no", "f", "false", "off".

    Whether the input text is one of "n", "no", "f", "false", "off". Case and leading and trailing whitespace do not matter.

    returns

    true if the input text is falsy, false otherwise

    Annotations
    @inline()
  27. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  28. def isTruthy: Boolean

    Whether the input text is one of "y", "yes", "t", "true", "on".

    Whether the input text is one of "y", "yes", "t", "true", "on". Case and leading and trailing whitespace do not matter.

    returns

    true if the input text is truthy, false otherwise

    Annotations
    @inline()
  29. def nonBlank: Boolean

    Checks whether the input text is not empty (""), not null and not whitespace-only.

    Checks whether the input text is not empty (""), not null and not whitespace-only.

    returns

    true if the input text is not null, empty or whitespace-only, false otherwise

    Annotations
    @inline()
  30. def normalizeSpace: String

    Removes leading and trailing whitespace and replaces sequences of whitespace by a single one.

    Removes leading and trailing whitespace and replaces sequences of whitespace by a single one.

    returns

    the input text with leading, trailing and consecutive whitespace removed

    Annotations
    @inline()
  31. def option: Option[StringOps]

    Creates an Option containing value.

    Creates an Option containing value.

    returns

    Some(value) if value is not null, None otherwise

    Implicit
    This member is added by an implicit conversion from StringOps to AnyOps[StringOps] performed by method AnyOps in scail.commons.ops.
    Definition Classes
    AnyOps
    Annotations
    @inline()
  32. def reader: Reader

    Creates a Reader backed by this input text.

    Creates a Reader backed by this input text.

    returns

    the Reader backed by this input text

    Annotations
    @inline()
  33. def safeEquals(that: String, cs: Charset = utf8): Boolean

    Alias for constantTimeEquals.

    Alias for constantTimeEquals.

    Annotations
    @inline()
  34. def stripAccents: String

    Removes diacritics (accents) from the input text.

    Removes diacritics (accents) from the input text.

    returns

    the input text with diacritics removed

    Annotations
    @inline()
  35. def tap(f: (StringOps) ⇒ Unit): StringOps

    Applies side-effectul method to value, returning value.

    Applies side-effectul method to value, returning value.

    f

    the side-effectful method to apply to value

    returns

    value

    Implicit
    This member is added by an implicit conversion from StringOps to AnyOps[StringOps] performed by method AnyOps in scail.commons.ops.
    Definition Classes
    AnyOps
  36. def titleCase: String

    Converts all the whitespace separated words into capitalized words, that is each word is made up of a title case character and then a series of lowercase characters.

    Converts all the whitespace separated words into capitalized words, that is each word is made up of a title case character and then a series of lowercase characters. Capitalization uses the Unicode title case, normally equivalent to upper case.

    returns

    the input text capitalized to title case

    Annotations
    @inline()
  37. def toString(): String
    Definition Classes
    Any
  38. def [B](y: B): (StringOps, B)
    Implicit
    This member is added by an implicit conversion from StringOps to ArrowAssoc[StringOps] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyVal

Inherited from Any

Inherited by implicit conversion AnyOps from StringOps to AnyOps[StringOps]

Inherited by implicit conversion any2stringadd from StringOps to any2stringadd[StringOps]

Inherited by implicit conversion StringFormat from StringOps to StringFormat[StringOps]

Inherited by implicit conversion Ensuring from StringOps to Ensuring[StringOps]

Inherited by implicit conversion ArrowAssoc from StringOps to ArrowAssoc[StringOps]

Ungrouped