Convert a string into a charcode list
by Mohan[ Edit ] 2012-09-20 22:57:27
Convert a string into a charcode list
Method 1: JavaScript 1.6
Array.map('foo', function(x) { return String.charCodeAt(x) }) // is [112,111,111]
Method 2: JavaScript 1.7
[ String.charCodeAt(x) for each ( x in 'foo' ) ] // is [112,111,111]