Change stdlib imports to use std prefix in most examples (#17202)

This commit is contained in:
Danil Yarantsev 2021-03-01 00:17:19 +03:00 • committed by GitHub
commit 56461c280f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 127 additions and 127 deletions

View file

@ -30,7 +30,7 @@
## # Be sure to compile with --threads:on.
## # The channels and threads modules are part of system and should not be
## # imported.
## import os
## import std/os
##
## # Channels can either be:
## # - declared at the module level, or

View file

@ -913,7 +913,7 @@ iterator lines*(filename: string): string {.tags: [ReadIOEffect].} =
## character(s) are removed from the iterated lines. Example:
##
## .. code-block:: nim
## import strutils
## import std/strutils
##
## proc transformLetters(filename: string) =
## var buffer = ""

View file

@ -12,7 +12,7 @@ iterator countdown*[T](a, b: T, step: Positive = 1): T {.inline.} =
## **Note**: This fails to count to `low(int)` if T = int for
## efficiency reasons.
runnableExamples:
import sugar
import std/sugar
let x = collect(newSeq):
for i in countdown(7, 3):
i
@ -49,7 +49,7 @@ iterator countup*[T](a, b: T, step: Positive = 1): T {.inline.} =
## **Note**: This fails to count to `high(int)` if T = int for
## efficiency reasons.
runnableExamples:
import sugar
import std/sugar
let x = collect(newSeq):
for i in countup(3, 7):
i
@ -78,7 +78,7 @@ iterator `..`*[T](a, b: T): T {.inline.} =
## See also:
## * [..<](#..<.i,T,T)
runnableExamples:
import sugar
import std/sugar
let x = collect(newSeq):
for i in 3 .. 7:

View file

@ -24,7 +24,7 @@
##
## .. code-block:: Nim
##
## import locks
## import std/locks
##
## var
## thr: array[0..4, Thread[tuple[a,b: int]]]