Packages

object SeqLike

The companion object for trait SeqLike.

Source
SeqLike.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SeqLike
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def indexOf[B](source: Seq[B], sourceOffset: Int, sourceCount: Int, target: Seq[B], targetOffset: Int, targetCount: Int, fromIndex: Int): Int

    Finds a particular index at which one sequence occurs in another sequence.

    Finds a particular index at which one sequence occurs in another sequence. Both the source sequence and the target sequence are expressed in terms other sequences S' and T' with offset and length parameters. This function is designed to wrap the KMP machinery in a sufficiently general way that all library sequence searches can use it. It is unlikely you have cause to call it directly: prefer functions such as StringBuilder#indexOf and Seq#lastIndexOf.

    source

    the sequence to search in

    sourceOffset

    the starting offset in source

    sourceCount

    the length beyond sourceOffset to search

    target

    the sequence being searched for

    targetOffset

    the starting offset in target

    targetCount

    the length beyond targetOffset which makes up the target string

    fromIndex

    the smallest index at which the target sequence may start

    returns

    the applicable index in source where target exists, or -1 if not found

  2. def lastIndexOf[B](source: Seq[B], sourceOffset: Int, sourceCount: Int, target: Seq[B], targetOffset: Int, targetCount: Int, fromIndex: Int): Int

    Finds a particular index at which one sequence occurs in another sequence.

    Finds a particular index at which one sequence occurs in another sequence. Like indexOf, but finds the latest occurrence rather than earliest.

    See also

    scala.collection.SeqLike, method indexOf