added note about $ for cstrings to the manual
This commit is contained in:
parent
e54ab22bf9
commit
e59ba5d8b2
1 changed files with 8 additions and 0 deletions
|
|
@ -965,6 +965,14 @@ stack roots conservatively. One can use the builtin procs ``GC_ref`` and
|
||||||
``GC_unref`` to keep the string data alive for the rare cases where it does
|
``GC_unref`` to keep the string data alive for the rare cases where it does
|
||||||
not work.
|
not work.
|
||||||
|
|
||||||
|
A `$` proc is defined for cstrings that returns a string. Thus to get a nimrod
|
||||||
|
string from a cstring:
|
||||||
|
|
||||||
|
.. code-block:: nimrod
|
||||||
|
var str: string = "Hello!"
|
||||||
|
var cstr: cstring = s
|
||||||
|
var newstr: string = $cstr
|
||||||
|
|
||||||
|
|
||||||
Structured types
|
Structured types
|
||||||
----------------
|
----------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue