From import statement
After the from keyword, a module name followed by an import to list the symbols one likes to use without explicit full qualification:
from std/strutils import `%`
echo "$1" % "abc"
# always possible: full qualification:
echo strutils.replace("abc", "a", "z")
It’s also possible to use from module import nil if one wants to import the module but wants to enforce fully qualified access to every symbol in module.
当前内容版权归 nim-lang.org 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 nim-lang.org .