Packages

object StringContext extends java.io.Serializable

Source
StringContext.scala
Linear Supertypes
java.io.Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StringContext
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class InvalidEscapeException extends IllegalArgumentException

    An exception that is thrown if a string contains a backslash (\) character that does not start a valid escape sequence.

Value Members

  1. def checkLengths(args: collection.Seq[Any], parts: Seq[String]): Unit

    Checks that the length of the given argument args is one less than the number of parts supplied to the StringContext.

    Checks that the length of the given argument args is one less than the number of parts supplied to the StringContext.

    Exceptions thrown

    IllegalArgumentException if this is not the case.

  2. def glob(patternChunks: Seq[String], input: String): Option[Seq[String]]

    Linear time glob-matching implementation.

    Linear time glob-matching implementation. Adapted from https://research.swtch.com/glob

    patternChunks

    The non-wildcard portions of the input pattern, separated by wildcards

    input

    The input you wish to match against

    returns

    None if there is no match, Some containing the sequence of matched wildcard strings if there is a match

  3. def processEscapes(str: String): String

    Expands standard Scala escape sequences in a string.

    Expands standard Scala escape sequences in a string. Escape sequences are: control: \b, \t, \n, \f, \r escape: \\, \", \'

    str

    A string that may contain escape sequences

    returns

    The string with all escape sequences expanded.

  4. def standardInterpolator(process: (String) => String, args: collection.Seq[Any], parts: Seq[String]): String

Deprecated Value Members

  1. def treatEscapes(str: String): String

    Expands standard Scala escape sequences in a string.

    Expands standard Scala escape sequences in a string. Escape sequences are: control: \b, \t, \n, \f, \r escape: \\, \", \'

    str

    A string that may contain escape sequences

    returns

    The string with all escape sequences expanded.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) use processEscapes