diff options
author | Euan <euantorano@gmail.com> | 2016-06-24 10:50:26 +0100 |
---|---|---|
committer | Euan <euantorano@gmail.com> | 2016-06-24 10:50:26 +0100 |
commit | 746357404cc2ec93407c04cc1720e17032fc0efd (patch) | |
tree | d8d12efe9bdb1d7698c23eb5a5bfe7a0e24b6fd8 /lib/pure | |
parent | d932cb1e515a52a8afde33feaf36ad5567e4e7df (diff) | |
download | Nim-746357404cc2ec93407c04cc1720e17032fc0efd.tar.gz |
Fixing isNilOrWhitespace for empty/nil strings.
`isSpace` returns false for an empty string, which is the opposite of this method.
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/strutils.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim index 082f02c07..51694e6ad 100644 --- a/lib/pure/strutils.nim +++ b/lib/pure/strutils.nim @@ -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`. |