1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

docs: cleanup (#14327)

This commit is contained in:
David 'Epper' Marshall
2022-05-07 13:18:42 -04:00
committed by GitHub
parent b53b1cc7cb
commit a91226c376
5 changed files with 28 additions and 20 deletions

View File

@ -249,7 +249,14 @@ pub fn (mut re RE) find_from(in_txt string, start int) (int, int) {
return -1, -1
}
// find_all find all the non overlapping occurrences of the match pattern
// find_all find all the non overlapping occurrences of the match pattern and return the start and end index of the match
//
// Usage:
// ```v
// blurb := 'foobar boo steelbar toolbox foot tooooot'
// mut re := regex.regex_opt('f|t[eo]+')?
// res := re.find_all(blurb) // [0, 3, 12, 15, 20, 23, 28, 31, 33, 39]
// ```
[direct_array_access]
pub fn (mut re RE) find_all(in_txt string) []int {
// old_flag := re.flag