Regex.splitToSequence, CharSequence.splitToSequence(Regex) #KT-23351

This commit is contained in:
Abduqodiri Qurbonzoda
2021-07-19 00:06:13 +03:00
committed by Space
parent 1fee6b191f
commit b65c477e68
11 changed files with 216 additions and 22 deletions
+9 -1
View File
@@ -40,13 +40,21 @@ actual class Regex {
actual fun findAll(input: CharSequence, startIndex: Int): Sequence<MatchResult> = TODO("Wasm stdlib: Text")
/**
* Splits the [input] CharSequence around matches of this regular expression.
* Splits the [input] CharSequence to a list of strings around matches of this regular expression.
*
* @param limit Non-negative value specifying the maximum number of substrings the string can be split to.
* Zero by default means no limit is set.
*/
actual fun split(input: CharSequence, limit: Int): List<String> = TODO("Wasm stdlib: Text")
/**
* Splits the [input] CharSequence to a sequence of strings around matches of this regular expression.
*
* @param limit Non-negative value specifying the maximum number of substrings the string can be split to.
* Zero by default means no limit is set.
*/
public actual fun splitToSequence(input: CharSequence, limit: Int): Sequence<String> = TODO("Wasm stdlib: Text")
actual companion object {
actual fun fromLiteral(literal: String): Regex = TODO("Wasm stdlib: Text")
actual fun escape(literal: String): String = TODO("Wasm stdlib: Text")