diff options
-rw-r--r-- | lib/system.nim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/system.nim b/lib/system.nim index 7b6f9716b..6de9f3a8a 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -869,7 +869,21 @@ proc `&` * (x: char, y: string): string {. # that the merge optimization works properly. proc add*(x: var string, y: char) {.magic: "AppendStrCh", noSideEffect.} + ## Appends `y` to `x` in place + ## + ## .. code-block:: Nimrod + ## var tmp = "" + ## tmp.add('a') + ## tmp.add('b') + ## assert(tmp == "ab") proc add*(x: var string, y: string) {.magic: "AppendStrStr", noSideEffect.} + ## Concatinates `x` and `y` in place + ## + ## .. code-block:: Nimrod + ## var tmp = "" + ## tmp.add("ab") + ## tmp.add("cd") + ## assert(tmp == "abcd") type TEndian* = enum ## is a type describing the endianness of a processor. |