(label)
| 309 | // Unfortunately, String.prototype.trim also removes non-ascii whitespace, |
| 310 | // so we have to do this manually |
| 311 | function trimAsciiWhitespace(label) { |
| 312 | let s = 0; |
| 313 | let e = label.length; |
| 314 | while (s < e && ( |
| 315 | label[s] === '\u0009' || |
| 316 | label[s] === '\u000a' || |
| 317 | label[s] === '\u000c' || |
| 318 | label[s] === '\u000d' || |
| 319 | label[s] === '\u0020')) { |
| 320 | s++; |
| 321 | } |
| 322 | while (e > s && ( |
| 323 | label[e - 1] === '\u0009' || |
| 324 | label[e - 1] === '\u000a' || |
| 325 | label[e - 1] === '\u000c' || |
| 326 | label[e - 1] === '\u000d' || |
| 327 | label[e - 1] === '\u0020')) { |
| 328 | e--; |
| 329 | } |
| 330 | return StringPrototypeSlice(label, s, e); |
| 331 | } |
| 332 | |
| 333 | function getEncodingFromLabel(label) { |
| 334 | const enc = encodings.get(label); |
no outgoing calls
no test coverage detected
searching dependent graphs…