mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-03 18:34:43 +00:00
parsutils: minor doc improvements
(cherry picked from commit 9331f06c0b)
This commit is contained in:
@@ -278,7 +278,7 @@ proc parseInt*(s: string, number: var int, start = 0): int {.
|
||||
rtl, extern: "npuParseInt", noSideEffect.} =
|
||||
## parses an integer starting at `start` and stores the value into `number`.
|
||||
## Result is the number of processed chars or 0 if there is no integer.
|
||||
## `EOverflow` is raised if an overflow occurs.
|
||||
## `OverflowError` is raised if an overflow occurs.
|
||||
var res: BiggestInt
|
||||
result = parseBiggestInt(s, res, start)
|
||||
if (sizeof(int) <= 4) and
|
||||
@@ -289,7 +289,7 @@ proc parseInt*(s: string, number: var int, start = 0): int {.
|
||||
|
||||
proc parseSaturatedNatural*(s: string, b: var int, start = 0): int =
|
||||
## parses a natural number into ``b``. This cannot raise an overflow
|
||||
## error. Instead of an ``Overflow`` exception ``high(int)`` is returned.
|
||||
## error. ``high(int)`` is returned for an overflow.
|
||||
## The number of processed character is returned.
|
||||
## This is usually what you really want to use instead of `parseInt`:idx:.
|
||||
## Example:
|
||||
|
||||
Reference in New Issue
Block a user