Change stdlib imports to use std prefix in most examples (#17202)
This commit is contained in:
parent
26a6ceb34e
commit
56461c280f
45 changed files with 127 additions and 127 deletions
|
|
@ -274,7 +274,7 @@ proc match*(s: string, pattern: Regex, matches: var openArray[string],
|
|||
## returned.
|
||||
##
|
||||
runnableExamples:
|
||||
import sequtils
|
||||
import std/sequtils
|
||||
var matches: array[2, string]
|
||||
if match("abcdefg", re"c(d)ef(g)", matches, 2):
|
||||
doAssert toSeq(matches) == @["d", "g"]
|
||||
|
|
@ -494,7 +494,7 @@ iterator split*(s: string, sep: Regex; maxsplit = -1): string =
|
|||
## Substrings are separated by the regular expression `sep`
|
||||
## (and the portion matched by `sep` is not returned).
|
||||
runnableExamples:
|
||||
import sequtils
|
||||
import std/sequtils
|
||||
doAssert toSeq(split("00232this02939is39an22example111", re"\d+")) ==
|
||||
@["", "this", "is", "an", "example", ""]
|
||||
var last = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue