Stan,
I just posted a comment to the SO post:
Assuming SQLite returns a hexadecimal string that looks like
"611006F462424C4183578E51B87021", you can iterate every two characters,
slice, parseInt and push onto an array. Since every two characters
represents a byte, just write a for loop that increase the index by 2 every
time instead of by 1. You can grab the two characters via String.slice(),
like so: hex.slice(ix, ix+2). You can convert these to an integer via
parseInt(str, 16). So it would look like:
arr = [];
for(var ix = 0; ix < hex.length; ix = ix+2) {
arr.push(parseInt(hex.slice(ix, ix+2), 16));
}
-- peter
From: [email protected] [mailto:[email protected]]
On Behalf Of Stan Wiechers
Sent: Sunday, April 10, 2011 8:13 AM
To: [email protected]
Subject: HTML5 Database
Hey,
I am developing a mobile HTML5 based web app which needs to store byte in a
HTML5 for fast/offline access. I came across the problem described here on
stackoverflow, curious if anyone can chime in.
http://stackoverflow.com/questions/5612637/storing-byte-array-in-html5-sqlit
e-database
Thanks very much,
Stan
--
"Local color. Soak it up"
Virginia Vidaura
http://www.merkwelt.com/people/stan/
--
You received this message because you are subscribed to the Google Groups
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/iphonewebdev?hl=en.
--
You received this message because you are subscribed to the Google Groups
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/iphonewebdev?hl=en.