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

docs: fix most of the examples (ensure they at least have a valid syntax)

This commit is contained in:
Delyan Angelov
2020-11-27 13:03:32 +02:00
parent e6116c47be
commit 7cd9530006
4 changed files with 21 additions and 15 deletions

View File

@ -410,7 +410,7 @@ pub fn new() RE
pub fn new_by_size(mult int) RE
```
After a base initializer is used, the regex expression must be compiled with:
```v oksyntax
```v ignore
// compile compiles the REgex returning an error if the compilation fails
pub fn (re mut RE) compile_opt(in_txt string) ?
```
@ -419,7 +419,7 @@ pub fn (re mut RE) compile_opt(in_txt string) ?
These are the operative functions
```v oksyntax
```v ignore
// match_string try to match the input string, return start and end index if found else start is -1
pub fn (re mut RE) match_string(in_txt string) (int,int)