(utftext)
| 76 | }, |
| 77 | |
| 78 | _utf8Decode(utftext) { |
| 79 | let string = ''; |
| 80 | let i = 0; |
| 81 | let c = 0; |
| 82 | let c2 = 0; |
| 83 | let c3 = 0; |
| 84 | while (i < utftext.length) { |
| 85 | c = utftext.charCodeAt(i); |
| 86 | if (c < 128) { |
| 87 | string += String.fromCharCode(c); |
| 88 | i++; |
| 89 | } else if ((c > 191) && (c < 224)) { |
| 90 | c2 = utftext.charCodeAt(i + 1); |
| 91 | string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); |
| 92 | i += 2; |
| 93 | } else { |
| 94 | c2 = utftext.charCodeAt(i + 1); |
| 95 | c3 = utftext.charCodeAt(i + 2); |
| 96 | string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); |
| 97 | i += 3; |
| 98 | } |
| 99 | } |
| 100 | return string; |
| 101 | }, |
| 102 | }; |
| 103 | |
| 104 | export default Base64; |
nothing calls this directly
no outgoing calls
no test coverage detected