Add extern pragma
This commit is contained in:
parent
d2c992c03d
commit
d886c44931
1 changed files with 5 additions and 3 deletions
|
|
@ -1395,7 +1395,8 @@ proc format*(formatstr: string, a: varargs[string, `$`]): string {.noSideEffect,
|
||||||
|
|
||||||
{.pop.}
|
{.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
|
## 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`
|
## set of characters. If the set of characters is only equal to `Newlines`
|
||||||
## then it will remove both the newline and return feed.
|
## 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)
|
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.
|
## Removes a single character (in-place) from a string.
|
||||||
## .. code-block:: nim
|
## .. code-block:: nim
|
||||||
## var
|
## var
|
||||||
|
|
@ -1434,7 +1435,8 @@ proc removeSuffix*(s: var string, c: char) {.rtl.} =
|
||||||
## table == "user"
|
## table == "user"
|
||||||
removeSuffix(s, chars = {c})
|
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.
|
## Remove the first matching suffix (in-place) from a string.
|
||||||
## .. code-block:: nim
|
## .. code-block:: nim
|
||||||
## var
|
## var
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue