change 'iff' to 'if' to stop "corrections" once and for all (#14182)

This commit is contained in:
Miran 2020-05-01 15:54:03 +02:00 • committed by GitHub
commit 9c33bcac5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 37 additions and 37 deletions

View file

@ -54,7 +54,7 @@ proc rawGet[T](c: CritBitTree[T], key: string): Node[T] =
return if it.key == key: it else: nil
proc contains*[T](c: CritBitTree[T], key: string): bool {.inline.} =
## Returns true iff `c` contains the given `key`.
## Returns true if `c` contains the given `key`.
runnableExamples:
var c: CritBitTree[void]
incl(c, "key")
@ -156,7 +156,7 @@ proc excl*[T](c: var CritBitTree[T], key: string) =
discard exclImpl(c, key)
proc missingOrExcl*[T](c: var CritBitTree[T], key: string): bool =
## Returns true iff `c` does not contain the given `key`. If the key
## Returns true if `c` does not contain the given `key`. If the key
## does exist, c.excl(key) is performed.
##
## See also:
@ -178,7 +178,7 @@ proc missingOrExcl*[T](c: var CritBitTree[T], key: string): bool =
result = c.count == oldCount
proc containsOrIncl*[T](c: var CritBitTree[T], key: string, val: T): bool =
## Returns true iff `c` contains the given `key`. If the key does not exist
## Returns true if `c` contains the given `key`. If the key does not exist
## ``c[key] = val`` is performed.
##
## See also:
@ -204,7 +204,7 @@ proc containsOrIncl*[T](c: var CritBitTree[T], key: string, val: T): bool =
if not result: n.val = val
proc containsOrIncl*(c: var CritBitTree[void], key: string): bool =
## Returns true iff `c` contains the given `key`. If the key does not exist
## Returns true if `c` contains the given `key`. If the key does not exist
## it is inserted into `c`.
##
## See also:

View file

@ -134,7 +134,7 @@ proc mgetOrPut*[A, B](t: var SharedTable[A, B], key: A, val: B): var B =
mgetOrPutImpl(enlarge)
proc hasKeyOrPut*[A, B](t: var SharedTable[A, B], key: A, val: B): bool =
## returns true iff `key` is in the table, otherwise inserts `value`.
## returns true if `key` is in the table, otherwise inserts `value`.
withLock t:
hasKeyOrPutImpl(enlarge)

View file

@ -31,7 +31,7 @@ when defined(js):
else:
proc startsWith*(s, prefix: cstring): bool {.noSideEffect,
rtl, extern: "csuStartsWith".} =
## Returns true iff ``s`` starts with ``prefix``.
## Returns true if ``s`` starts with ``prefix``.
##
## If ``prefix == ""`` true is returned.
##
@ -44,7 +44,7 @@ else:
proc endsWith*(s, suffix: cstring): bool {.noSideEffect,
rtl, extern: "csuEndsWith".} =
## Returns true iff ``s`` ends with ``suffix``.
## Returns true if ``s`` ends with ``suffix``.
##
## If ``suffix == ""`` true is returned.
##
@ -64,9 +64,9 @@ proc cmpIgnoreStyle*(a, b: cstring): int {.noSideEffect,
## NOT be used to compare Nim identifier names. use `macros.eqIdent`
## for that. Returns:
##
## | 0 iff a == b
## | < 0 iff a < b
## | > 0 iff a > b
## | 0 if a == b
## | < 0 if a < b
## | > 0 if a > b
##
## Not supported for JS backend, use `strutils.cmpIgnoreStyle
## <https://nim-lang.org/docs/strutils.html#cmpIgnoreStyle%2Cstring%2Cstring>`_ instead.
@ -86,9 +86,9 @@ proc cmpIgnoreCase*(a, b: cstring): int {.noSideEffect,
rtl, extern: "csuCmpIgnoreCase".} =
## Compares two strings in a case insensitive manner. Returns:
##
## | 0 iff a == b
## | < 0 iff a < b
## | > 0 iff a > b
## | 0 if a == b
## | < 0 if a < b
## | > 0 if a > b
##
## Not supported for JS backend, use `strutils.cmpIgnoreCase
## <https://nim-lang.org/docs/strutils.html#cmpIgnoreCase%2Cstring%2Cstring>`_ instead.

View file

@ -797,9 +797,9 @@ proc cmpPaths*(pathA, pathB: string): int {.
## On a case-sensitive filesystem this is done
## case-sensitively otherwise case-insensitively. Returns:
##
## | 0 iff pathA == pathB
## | < 0 iff pathA < pathB
## | > 0 iff pathA > pathB
## | 0 if pathA == pathB
## | < 0 if pathA < pathB
## | > 0 if pathA > pathB
runnableExamples:
when defined(macosx):
assert cmpPaths("foo", "Foo") == 0
@ -1108,7 +1108,7 @@ proc existsFile*(filename: string): bool {.rtl, extern: "nos$1",
proc existsDir*(dir: string): bool {.rtl, extern: "nos$1", tags: [ReadDirEffect],
noNimScript.} =
## Returns true iff the directory `dir` exists. If `dir` is a file, false
## Returns true if the directory `dir` exists. If `dir` is a file, false
## is returned. Follows symlinks.
##
## See also:
@ -1128,7 +1128,7 @@ proc existsDir*(dir: string): bool {.rtl, extern: "nos$1", tags: [ReadDirEffect]
proc symlinkExists*(link: string): bool {.rtl, extern: "nos$1",
tags: [ReadDirEffect],
noNimScript.} =
## Returns true iff the symlink `link` exists. Will return true
## Returns true if the symlink `link` exists. Will return true
## regardless of whether the link points to a directory or file.
##
## See also:

View file

@ -199,7 +199,7 @@ proc kill*(p: Process) {.rtl, extern: "nosp$1", tags: [].}
## * `terminate proc <#terminate,Process>`_
proc running*(p: Process): bool {.rtl, extern: "nosp$1", tags: [].}
## Returns true iff the process `p` is still running. Returns immediately.
## Returns true if the process `p` is still running. Returns immediately.
proc processID*(p: Process): int {.rtl, extern: "nosp$1".} =
## Returns `p`'s process ID.

View file

@ -59,7 +59,7 @@ proc stripGenericParams*(t: typedesc): typedesc {.magic: "TypeTrait".}
## them unmodified.
proc supportsCopyMem*(t: typedesc): bool {.magic: "TypeTrait".}
## This trait returns true iff the type ``t`` is safe to use for
## This trait returns true if the type ``t`` is safe to use for
## `copyMem`:idx:.
##
## Other languages name a type like these `blob`:idx:.