Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2005-10-29 (00:24)
From: Jonathan Roewen <jonathan.roewen@g...>
Subject: [Caml-list] caml_copy_string

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?