KetexSet

class KetexSet(negate: Boolean) : KetexFragment, KetexToken

Constructors

Link copied to clipboard
fun KetexSet(negate: Boolean)

Functions

Link copied to clipboard
fun add(group: KetexGroup)
fun add(set: KetexSet)
fun add(token: KetexToken)

fun add(str: String, escape: Boolean = true)

Append a raw string of characters to the regex.

Link copied to clipboard
infix fun intersect(other: KetexSet)

Intersects this set with another set ([\w&&[^\d]]), matching the result.

Link copied to clipboard
open operator fun invoke(): String
Link copied to clipboard
operator fun not(): KetexSet

Negates the current set ([^abcedfu]), making it match any character not in the set.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
operator fun KetexGroup.unaryPlus()

Append a regex group to the regex.

operator fun KetexSet.unaryPlus()

Append a character set to match in the regex.

operator fun KetexToken.unaryPlus()

Append a custom regex token to match in the regex. DOES NOT escape metacharacters.

operator fun Char.unaryPlus()

Append a single character to match in the regex. This function escapes the char before appending it to the regex, so it cannot add metacharacters.

operator fun String.unaryPlus()

Append a string of characters to match in the regex. This function escapes the string before appending it to the regex, so it cannot add metacharacters.

open operator override fun CharRange.unaryPlus()