kantan.regex.ops

StringOps

implicit final class StringOps extends AnyVal

Enriches String with useful regex-related syntax.

Linear Supertypes
AnyVal, NotNull, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. StringOps
  2. AnyVal
  3. NotNull
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new StringOps(str: String)

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  2. final def ##(): Int

    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def evalRegex[A](expr: String, group: Int)(implicit arg0: GroupDecoder[A]): Iterator[RegexResult[A]]

    Compiles and evaluates the specified regular expression against this string.

    Compiles and evaluates the specified regular expression against this string.

    This method is useful when extracting simple types (that is, types that have a GroupDecoder) from groups rather than entire matches.

    For example, imagine that we have the following regular expression: \[(\d+)\]. Each match will contain the wrapping brackets - [123], for example. In order to only extract information from the first group rather than the entire match, one would write:

    str.evalRegex[Int]("\\[(\\d+)\\]", 1)
    expr

    regular expression to compile and evaluate.

    group

    index of the group from which to extract data in each match.

  6. def evalRegex[A](expr: String)(implicit arg0: MatchDecoder[A]): Iterator[RegexResult[A]]

    Compiles and evaluates the specified regular expression against this string.

  7. def evalRegex[A](r: Regex[A]): Iterator[A]

    Shorthand for Regex.eval.

  8. def getClass(): Class[_ <: AnyVal]

    Definition Classes
    AnyVal → Any
  9. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  10. val str: String

  11. def toString(): String

    Definition Classes
    Any
  12. def unsafeEvalRegex[A](expr: String, group: Int)(implicit arg0: GroupDecoder[A]): Iterator[A]

    Unsafe version of evalRegex[A](expr:String,group:Int)* .

  13. def unsafeEvalRegex[A](expr: String)(implicit arg0: MatchDecoder[A]): Iterator[A]

    Unsafe version of evalRegex[A](expr:String)* .

Inherited from AnyVal

Inherited from NotNull

Inherited from Any

Ungrouped