Improve String::WriteAscii and add PRESERVE_ASCII_NULL option.
authoryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 23 Jul 2012 14:22:46 +0000 (14:22 +0000)
committeryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 23 Jul 2012 14:22:46 +0000 (14:22 +0000)
commit6b489d97533a859ad42ebb05c7781d4680a85271
treec3731d3bac42ad67bda3b50c7efd5e7c027dcff9
parent3667f92cbb5d1075f746cd1d10d91f6b179853e5
Improve String::WriteAscii and add PRESERVE_ASCII_NULL option.

The PRESERVE_ASCII_NULL option prevents WriteAscii from converting
\0 to white space.

R=verwaest@chromium.org
BUG=v8:2252
TEST=test-api/StringWrite

Review URL: https://chromiumcodereview.appspot.com/10810056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
include/v8.h
src/api.cc
test/cctest/test-api.cc