promote std prefix in docs (#17128)
This commit is contained in:
parent
778f124af0
commit
69a78c9183
9 changed files with 41 additions and 41 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue