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:
Euan
2016-06-24 10:50:26 +01:00
parent d932cb1e51
commit 746357404c

View File

@@ -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`.