return substring(string, offset, offset + 1);
};
+var charCodeAt = function(string, offset) {
+ var char = charAt(string, offset);
+ if (char.length != 2)
+ return char.charCodeAt(0);
+ return 0x10000 | (char.charCodeAt(0) & 0x03ff) << 10 | char.charCodeAt(1) & 0x03ff
+};
+
var length = function(string) {
return unit2point(string, [string.length])[0];
};
this.length = length(string);
};
+Unicode.fromCharCode = function() {
+ return encode(arguments);
+};
+
Unicode.prototype.charAt = function(index) {
return new Unicode(charAt(this.string, index));
};
+Unicode.prototype.charCodeAt = function(index) {
+ return charCodeAt(this.string, index);
+};
+
Unicode.prototype.substr = function(start, length) {
return new Unicode(substr(this.string, start, length));
};
unit2point: unit2point,
charAt: charAt,
+ charCodeAt: charCodeAt,
length: length,
substr: substr,
substring: substring,