From e59ba5d8b2299bccdf842c9a55d355ebc87febff Mon Sep 17 00:00:00 2001 From: Charlie Date: Sun, 18 May 2014 18:48:12 -0400 Subject: [PATCH] added note about `$` for cstrings to the manual --- doc/manual.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/manual.txt b/doc/manual.txt index d3a330e3a2..fe4f0c0383 100644 --- a/doc/manual.txt +++ b/doc/manual.txt @@ -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 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 ----------------