Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] caml_copy_string
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jonathan Roewen <jonathan.roewen@g...>
Subject: [Caml-list] caml_copy_string
Hi,

I notice than caml_copy_string only works with null terminated
C-strings. What is the alternative way to copy a random amount of
char* data that contains embedded nulls into an ocaml string (knowing
the length of the data)?

Also, out of curiosity: does caml_copy_string reference the string
itself, or does it make a full copy of it (no sharing)? IE, does
modification of the C-string affect the ocaml string?

Jonathan