diff options
author | Araq <rumpf_a@web.de> | 2014-08-28 02:12:49 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-08-28 02:12:49 +0200 |
commit | 00f50f27973ff33217eabe0b5f02cab49a0d8601 (patch) | |
tree | 0f7a75a80ec05e5998286bcf45c03d60a4656099 /lib | |
parent | 42f5a838a396a05c8931c41498ff8026620d4f30 (diff) | |
download | Nim-00f50f27973ff33217eabe0b5f02cab49a0d8601.tar.gz |
more modules updated
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/matchers.nim | 4 | ||||
-rw-r--r-- | lib/pure/strutils.nim | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/pure/matchers.nim b/lib/pure/matchers.nim index c3ad7235f..46fc9985c 100644 --- a/lib/pure/matchers.nim +++ b/lib/pure/matchers.nim @@ -31,8 +31,8 @@ proc validEmailAddress*(s: string): bool {.noSideEffect, inc(i) if s[i] != '@': return false var j = len(s)-1 - if s[j] notin letters: return false - while j >= i and s[j] in letters: dec(j) + if s[j] notin Letters: return false + while j >= i and s[j] in Letters: dec(j) inc(i) # skip '@' while s[i] in {'0'..'9', 'a'..'z', '-', '.'}: inc(i) if s[i] != '\0': return false diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim index 2af973b6e..5153455e2 100644 --- a/lib/pure/strutils.nim +++ b/lib/pure/strutils.nim @@ -130,7 +130,7 @@ proc normalize*(s: string): string {.noSideEffect, procvar, if j != s.len: setLen(result, j) proc cmpIgnoreCase*(a, b: string): int {.noSideEffect, - rtl, extern: "nsuCmpIgnoreCase", procvar, operator: 4.} = + rtl, extern: "nsuCmpIgnoreCase", procvar.} = ## Compares two strings in a case insensitive manner. Returns: ## ## | 0 iff a == b @@ -148,7 +148,7 @@ proc cmpIgnoreCase*(a, b: string): int {.noSideEffect, # thus we compile without checks here proc cmpIgnoreStyle*(a, b: string): int {.noSideEffect, - rtl, extern: "nsuCmpIgnoreStyle", procvar, operator: 3.} = + rtl, extern: "nsuCmpIgnoreStyle", procvar.} = ## Compares two strings normalized (i.e. case and ## underscores do not matter). Returns: ## @@ -170,7 +170,7 @@ proc cmpIgnoreStyle*(a, b: string): int {.noSideEffect, {.pop.} proc strip*(s: string, leading = true, trailing = true): string {.noSideEffect, - rtl, extern: "nsuStrip", operator: 5.} = + rtl, extern: "nsuStrip".} = ## Strips whitespace from `s` and returns the resulting string. ## ## If `leading` is true, leading whitespace is stripped. @@ -1147,7 +1147,7 @@ type proc formatBiggestFloat*(f: BiggestFloat, format: FloatFormatMode = ffDefault, precision: range[0..32] = 16): string {. - noSideEffect, operator: 2, rtl, extern: "nsu$1".} = + noSideEffect, rtl, extern: "nsu$1".} = ## Converts a floating point value `f` to a string. ## ## If ``format == ffDecimal`` then precision is the number of digits to @@ -1178,7 +1178,7 @@ proc formatBiggestFloat*(f: BiggestFloat, format: FloatFormatMode = ffDefault, proc formatFloat*(f: float, format: FloatFormatMode = ffDefault, precision: range[0..32] = 16): string {. - noSideEffect, operator: 2, rtl, extern: "nsu$1".} = + noSideEffect, rtl, extern: "nsu$1".} = ## Converts a floating point value `f` to a string. ## ## If ``format == ffDecimal`` then precision is the number of digits to |