Why does all white spaces get removed in the example below?
//C++
Handle<Value> System::log(const Arguments& args)
{
for(int i = 0, s = args.Length(); i < s; ++i) {
String::AsciiValue ascii(args[i]);
os.write(*ascii, ascii.length()) << std::endl; //os = std::ostream&
object
}
return Undefined();
}
//Then in javascript, there the System object have been "exposed" to
JavaScript.
System.log("How are you?"); //prints "howareyou?" not "how are you?", e.g
no whitespaces
In the example do I get the text: "Howareyou?", not "How are you?", what
does I wrong? Why are all white spaces removed? The std::ostream::write
write oformatted output, so it does not remove any white space, so it is
not the problem.
Thanks in advance!
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users