-
Notifications
You must be signed in to change notification settings - Fork 1
2.1 string
gettocat edited this page Aug 25, 2017
·
2 revisions
string it is var_str value (var_str documentation)
var_int(len) + char[len]
read from Buffer (or hex string) into String object.
write from String|Buffer into Buffer object.
read from stack string value
var script = {
'keyname': ['string']
}
var stack = new bitPony.stackReader(buffer, script)write into stack string value
var script = [
['string', value],
];
var stack = new bitPony.stackWriter(buffer, script);read from stream string
var stream = new bitPony.reader(b);
var res = stream.string(offset);
//res.resultwrite to stream char value
var stream = new bitPony.writer(b);
stream.string(value, true);
//or
var res = stream.string(value);
//res.result