All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kotlin.text.regex.RegexExtensions.kt Maven / Gradle / Ivy

There is a newer version: 1.0.7
Show newest version
@file:kotlin.jvm.JvmMultifileClass
@file:kotlin.jvm.JvmName("StringsKt")

package kotlin

import kotlin.text.*

/**
 * Converts the string into a regular expression [Regex] with the default options.
 */
public fun String.toRegex(): Regex = Regex(this)

/**
 * Converts the string into a regular expression [Regex] with the specified single [option].
 */
public fun String.toRegex(option: RegexOption): Regex = Regex(this, option)

/**
 * Converts the string into a regular expression [Regex] with the specified set of [options].
 */
public fun String.toRegex(options: Set): Regex = Regex(this, options)

/* Not available on platform: JS */









© 2015 - 2024 Weber Informatics LLC | Privacy Policy