Hi,
Suppose that I pass a string from JavaScript-land to a function
defined in a C extension. If the string is short, it's easy to convert
it:
const char* stringArgToCStr(const v8::Local<v8::Value> arg) {
v8::String::AsciiValue str(arg);
return *str;
}
However, this will break if the string is more than 256 characters
long (as will v8::String::Utf8Value). How do I work with strings of
longer length from C-world? Looking at the API docs, it sounds like I
should be using an external string for efficiency's sake, but I'm
unclear on how to use them. Concrete examples would be greatly
appreciated.
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users