From 746357404cc2ec93407c04cc1720e17032fc0efd Mon Sep 17 00:00:00 2001 From: Euan Date: Fri, 24 Jun 2016 10:50:26 +0100 Subject: [PATCH] Fixing isNilOrWhitespace for empty/nil strings. `isSpace` returns false for an empty string, which is the opposite of this method. --- lib/pure/strutils.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim index 082f02c07b..51694e6ade 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`.