CharSet

halotukozak.regex.CharSet$package.CharSet
object CharSet

Attributes

Source
CharSet.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
CharSet.type

Members list

Type members

Classlikes

object given_FromExpr_CharSet extends FromExpr[CharSet]

Attributes

Source
CharSet.scala
Supertypes
trait FromExpr[CharSet]
class Object
trait Matchable
class Any
Self type
object given_ToExpr_CharSet extends ToExpr[CharSet]

Attributes

Source
CharSet.scala
Supertypes
trait ToExpr[CharSet]
class Object
trait Matchable
class Any
Self type

Value members

Concrete methods

def normalize(rs: Iterable[Range]): CharSet

Builds a normalized CharSet from arbitrary (possibly overlapping) ranges.

Builds a normalized CharSet from arbitrary (possibly overlapping) ranges.

Attributes

Source
CharSet.scala
def normalize(ranges: Range*): CharSet

Attributes

Source
CharSet.scala
def of(ranges: ArraySeq[Range]): CharSet

Lifts an already-normalized ArraySeq of ranges into a CharSet.

Lifts an already-normalized ArraySeq of ranges into a CharSet.

Attributes

Source
CharSet.scala
def range(lo: Char, hi: Char): CharSet

Attributes

Source
CharSet.scala
def range(lo: Int, hi: Int): CharSet

Attributes

Source
CharSet.scala
def single(c: Char): CharSet

Attributes

Source
CharSet.scala
def single(c: Int): CharSet

Attributes

Source
CharSet.scala

Concrete fields

val all: CharSet

Attributes

Source
CharSet.scala

What . matches in Java regex without DOTALL flag — all code points except line terminators.

What . matches in Java regex without DOTALL flag — all code points except line terminators.

Attributes

Source
CharSet.scala
val empty: CharSet

Attributes

Source
CharSet.scala
val maxCodePoint: Int

Upper bound used for complement. Covers all valid Unicode code points.

Upper bound used for complement. Covers all valid Unicode code points.

Attributes

Source
CharSet.scala

Extensions

Extensions

extension (cs: CharSet)
def &(other: CharSet): CharSet

Same reasoning as | above - SeqOps also inherits an intersect (multiset intersection by element equality, not numeric overlap).

Same reasoning as | above - SeqOps also inherits an intersect (multiset intersection by element equality, not numeric overlap).

Attributes

Source
CharSet.scala

Attributes

Source
CharSet.scala
def contains(c: Int): Boolean

Attributes

Source
CharSet.scala
infix def intersect(other: CharSet): CharSet

Attributes

Source
CharSet.scala
def isEmpty: Boolean

Attributes

Source
CharSet.scala
def iterator: Iterator[Range]

Attributes

Source
CharSet.scala
infix def union(other: CharSet): CharSet

Attributes

Source
CharSet.scala
def |(other: CharSet): CharSet

cs.union(other) here would make the compiler's overload search also consider (and silently bind to instead of union above) the inherited, deprecated SeqOps.union - CharSet is transparently ArraySeq[Range] in this defining scope. Renaming the import forces resolution to this union specifically, since unionRenamed has nothing else to collide with. @nowarn on the whole method (rather than the import line itself, which doesn't accept annotations) silences the resulting - and, here, incorrect - "unused import" warning: the renamed import is used, just via extension-call syntax (cs.unionRenamed(...)) the unused-import checker doesn't recognize as a use.

cs.union(other) here would make the compiler's overload search also consider (and silently bind to instead of union above) the inherited, deprecated SeqOps.union - CharSet is transparently ArraySeq[Range] in this defining scope. Renaming the import forces resolution to this union specifically, since unionRenamed has nothing else to collide with. @nowarn on the whole method (rather than the import line itself, which doesn't accept annotations) silences the resulting - and, here, incorrect - "unused import" warning: the renamed import is used, just via extension-call syntax (cs.unionRenamed(...)) the unused-import checker doesn't recognize as a use.

Attributes

Source
CharSet.scala