findAll() Function
The findAll() function returns a sequence of all occurrences of a regular expression within the input string, beginning at the specified startIndex.
Syntax:
fun findAll(
input: CharSequence,
startIndex: Int = 0
): Sequence<MatchResult>
Kotlin program to demonstrate the example of findAll() function
Output:
Explanation:
In the first statement "Hello" is there one time, and in the second statement "Hello" is there two times.
need an explanation for this answer? contact us directly to get an explanation for this answer