diff options
author | Zach Aysan <zachaysan@gmail.com> | 2015-07-21 15:51:47 -0400 |
---|---|---|
committer | Zach Aysan <zachaysan@gmail.com> | 2015-07-21 15:51:47 -0400 |
commit | d886c44931e8f69e6b70973e8d85b6b13cf4f75c (patch) | |
tree | c15f266be1cfa776f48d16d1ab96b145abe82a1a /lib | |
parent | d2c992c03d498b7427ed393fc203609578fd6c96 (diff) | |
download | Nim-d886c44931e8f69e6b70973e8d85b6b13cf4f75c.tar.gz |
Add extern pragma
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/strutils.nim | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim index 3c6421bd5..e3f99b895 100644 --- a/lib/pure/strutils.nim +++ b/lib/pure/strutils.nim @@ -1395,7 +1395,8 @@ proc format*(formatstr: string, a: varargs[string, `$`]): string {.noSideEffect, {.pop.} -proc removeSuffix*(s: var string, chars: set[char] = Newlines) {.rtl.} = +proc removeSuffix*(s: var string, chars: set[char] = Newlines) {. + rtl, extern: "nsuRemoveSuffixCharSet".} = ## Removes the first matching character from the string (in-place) given a ## set of characters. If the set of characters is only equal to `Newlines` ## then it will remove both the newline and return feed. @@ -1425,7 +1426,7 @@ proc removeSuffix*(s: var string, chars: set[char] = Newlines) {.rtl.} = s.setLen(last + 1) -proc removeSuffix*(s: var string, c: char) {.rtl.} = +proc removeSuffix*(s: var string, c: char) {.rtl, extern: "nsuRemoveSuffixChar".} = ## Removes a single character (in-place) from a string. ## .. code-block:: nim ## var @@ -1434,7 +1435,8 @@ proc removeSuffix*(s: var string, c: char) {.rtl.} = ## table == "user" removeSuffix(s, chars = {c}) -proc removeSuffix*(s: var string, suffix: string) {.rtl.} = +proc removeSuffix*(s: var string, suffix: string) {. + rtl, extern: "nsuRemoveSuffixString".} = ## Remove the first matching suffix (in-place) from a string. ## .. code-block:: nim ## var |