KT-20357 Add sample code for Regex.find

Co-authored-by: Ilya Gorbunov <ilya.gorbunov@jetbrains.com>
This commit is contained in:
shiraji
2018-03-15 20:14:09 +09:00
committed by Ilya Gorbunov
parent f06ea6fddd
commit 0c97d99d77
2 changed files with 24 additions and 0 deletions
@@ -47,6 +47,7 @@ expect class Regex {
*
* @param startIndex An index to start search with, by default 0. Must be not less than zero and not greater than `input.length()`
* @return An instance of [MatchResult] if match was found or `null` otherwise.
* @sample samples.text.Regexps.find
*/
fun find(input: CharSequence, startIndex: Int = 0): MatchResult?