diff options
author | Andreas Rumpf <andreas@andreas-desktop> | 2010-01-13 00:38:39 +0100 |
---|---|---|
committer | Andreas Rumpf <andreas@andreas-desktop> | 2010-01-13 00:38:39 +0100 |
commit | fb2ae12c4969d41fbb0857a0b9121ad947807a1e (patch) | |
tree | 90a268cc659d6c5c28408976a368cc503720fe1f /lib/pure/strutils.nim | |
parent | 55e900bba2be06cf91789e749d9fc31f017a0dd0 (diff) | |
download | Nim-fb2ae12c4969d41fbb0857a0b9121ad947807a1e.tar.gz |
sockets module complete
Diffstat (limited to 'lib/pure/strutils.nim')
-rwxr-xr-x | lib/pure/strutils.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim index d7fd69f61..1dfb070bc 100755 --- a/lib/pure/strutils.nim +++ b/lib/pure/strutils.nim @@ -1,7 +1,7 @@ # # # Nimrod's Runtime Library -# (c) Copyright 2009 Andreas Rumpf +# (c) Copyright 2010 Andreas Rumpf # # See the file "copying.txt", included in this # distribution, for details about the copyright. @@ -655,8 +655,7 @@ proc replace*(s: string, sub, by: char): string = proc delete*(s: var string, first, last: int) = ## Deletes in `s` the characters at position `first`..`last`. This modifies ## `s` itself, it does not return a copy. - var - i = first + var i = first # example: "abc___uvwxyz\0" (___ is to be deleted) # --> first == 3, last == 5 # s[first..] = s[last+1..] @@ -851,6 +850,7 @@ proc escape*(s: string, prefix = "\"", suffix = "\""): string = proc validEmailAddress*(s: string): bool = ## returns true if `s` seems to be a valid e-mail address. ## The checking also uses a domain list. + ## Note: This will be moved into another module soon. const chars = Letters + Digits + {'!','#','$','%','&', '\'','*','+','/','=','?','^','_','`','{','}','|','~','-','.'} |