Added samples for String.replace() function
This commit is contained in:
committed by
Abduqodiri Qurbonzoda
parent
77180a5b13
commit
ee952db1a2
@@ -196,12 +196,16 @@ public expect fun CharSequence.repeat(n: Int): String
|
||||
|
||||
/**
|
||||
* Returns a new string with all occurrences of [oldChar] replaced with [newChar].
|
||||
*
|
||||
* @sample samples.text.Strings.replace
|
||||
*/
|
||||
expect fun String.replace(oldChar: Char, newChar: Char, ignoreCase: Boolean = false): String
|
||||
|
||||
/**
|
||||
* Returns a new string obtained by replacing all occurrences of the [oldValue] substring in this string
|
||||
* with the specified [newValue] string.
|
||||
*
|
||||
* @sample samples.text.Strings.replace
|
||||
*/
|
||||
expect fun String.replace(oldValue: String, newValue: String, ignoreCase: Boolean = false): String
|
||||
|
||||
|
||||
Reference in New Issue
Block a user