@@ -4,6 +4,8 @@ Elm.Native.Char.make = function(elm) {
4 elm.Native.Char = elm.Native.Char || {};
4 elm.Native.Char = elm.Native.Char || {};
5 if (elm.Native.Char.values) return elm.Native.Char.values;
5 if (elm.Native.Char.values) return elm.Native.Char.values;
7+ var Utils = Elm.Native.Utils.make(elm);
7 function isBetween(lo,hi) { return function(chr) {
9 function isBetween(lo,hi) { return function(chr) {
8 var c = chr.charCodeAt(0);
10 var c = chr.charCodeAt(0);
9 return lo <= c && c <= hi;
11 return lo <= c && c <= hi;
@@ -16,10 +18,10 @@ Elm.Native.Char.make = function(elm) {
16 return elm.Native.Char.values = {
18 return elm.Native.Char.values = {
17 fromCode : function(c) { return String.fromCharCode(c); },
19 fromCode : function(c) { return String.fromCharCode(c); },
18 toCode : function(c) { return c.toUpperCase().charCodeAt(0); },
20 toCode : function(c) { return c.toUpperCase().charCodeAt(0); },
19− toUpper : function(c) { return c.toUpperCase(); },
21+ toUpper : function(c) { return Utils.chr(c.toUpperCase()); },
20− toLower : function(c) { return c.toLowerCase(); },
22+ toLower : function(c) { return Utils.chr(c.toLowerCase()); },
21− toLocaleUpper : function(c) { return c.toLocaleUpperCase(); },
23+ toLocaleUpper : function(c) { return Utils.chr(c.toLocaleUpperCase()); },
22− toLocaleLower : function(c) { return c.toLocaleLowerCase(); },
24+ toLocaleLower : function(c) { return Utils.chr(c.toLocaleLowerCase()); },
23 isLower : isBetween('a'.charCodeAt(0),'z'.charCodeAt(0)),
25 isLower : isBetween('a'.charCodeAt(0),'z'.charCodeAt(0)),
24 isUpper : isBetween('A'.charCodeAt(0),'Z'.charCodeAt(0)),
26 isUpper : isBetween('A'.charCodeAt(0),'Z'.charCodeAt(0)),
25 isDigit : isDigit,
27 isDigit : isDigit,