promote std prefix in docs (#17128)

This commit is contained in:
flywind 2021-02-21 00:38:29 -06:00 • committed by GitHub
commit 69a78c9183
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 41 additions and 41 deletions

View file

@ -182,7 +182,7 @@ for any type:
.. code-block:: nim
:test: "nim c $1"
import strutils
import std/strutils
echo "abc".len # is the same as echo len("abc")
echo "abc".toUpperAscii()
@ -196,7 +196,7 @@ So "pure object oriented" code is easy to write:
.. code-block:: nim
:test: "nim c $1"
import strutils, sequtils
import std/[strutils, sequtils]
stdout.writeLine("Give a list of numbers (separated by spaces): ")
stdout.write(stdin.readLine.splitWhitespace.map(parseInt).max.`$`)
@ -375,7 +375,7 @@ The ``try`` statement handles exceptions:
.. code-block:: nim
:test: "nim c $1"
from strutils import parseInt
from std/strutils import parseInt
# read the first two lines of a text file that should contain numbers
# and tries to add them
@ -649,7 +649,7 @@ Example: Lifting Procs
.. code-block:: nim
:test: "nim c $1"
import math
import std/math
template liftScalarProc(fname) =
## Lift a proc taking one scalar parameter and returning a