(string)
| 6408 | } |
| 6409 | |
| 6410 | function wtf8encode(string) { |
| 6411 | var codePoints = ucs2decode(string); |
| 6412 | var length = codePoints.length; |
| 6413 | var index = -1; |
| 6414 | var codePoint; |
| 6415 | var byteString = ''; |
| 6416 | while (++index < length) { |
| 6417 | codePoint = codePoints[index]; |
| 6418 | byteString += encodeCodePoint(codePoint); |
| 6419 | } |
| 6420 | return byteString; |
| 6421 | } |
| 6422 | |
| 6423 | /*--------------------------------------------------------------------------*/ |
| 6424 |
nothing calls this directly
no test coverage detected