Fixing isNilOrWhitespace for empty/nil strings.
`isSpace` returns false for an empty string, which is the opposite of this method.
This commit is contained in:
parent
d932cb1e51
commit
746357404c
1 changed files with 1 additions and 1 deletions
|
|
@ -331,7 +331,7 @@ proc isNilOrEmpty*(s: string): bool {.noSideEffect, procvar, rtl, extern: "nsuIs
|
|||
## Checks if `s` is nil or empty.
|
||||
result = len(s) == 0
|
||||
|
||||
proc isNilOrWhitespace*(s: string): bool {.noSideEffect, procvar, rtl, extern: "nsuIsNilOrWhitespace".} = isSpace(s)
|
||||
proc isNilOrWhitespace*(s: string): bool {.noSideEffect, procvar, rtl, extern: "nsuIsNilOrWhitespace".} =
|
||||
## Checks if `s` is nil or consists entirely of whitespace characters.
|
||||
##
|
||||
## This is an alias to `isSpace`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue