StringContext

scala.StringContext
See theStringContext companion class
object StringContext

Attributes

Companion
class
Source
StringContext.scala
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

class InvalidEscapeException(str: String, val index: Int) extends IllegalArgumentException

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

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

Value parameters

index

The index of the offending backslash character in str.

str

The offending string

Attributes

Source
StringContext.scala
Supertypes
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Inherited and Abstract types

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
Source
Mirror.scala

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def checkLengths(args: 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.

Attributes

Throws

IllegalArgumentException if this is not the case.

Source
StringContext.scala
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

Value parameters

input

The input you wish to match against

patternChunks

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

Attributes

Returns

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

Source
StringContext.scala

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: \\, \", \'

Value parameters

str

A string that may contain escape sequences

Attributes

Returns

The string with all escape sequences expanded.

Source
StringContext.scala
def standardInterpolator(process: String => String, args: Seq[Any], parts: Seq[String]): String

Attributes

Source
StringContext.scala

Deprecated methods

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: \\, \", \'

Value parameters

str

A string that may contain escape sequences

Attributes

Returns

The string with all escape sequences expanded.

Deprecated
true
Source
StringContext.scala