(start, end int)
| 475 | } |
| 476 | |
| 477 | func (s unicodeString) Substring(start, end int) String { |
| 478 | ss := s[start+1 : end+1] |
| 479 | for _, c := range ss { |
| 480 | if c >= utf8.RuneSelf { |
| 481 | b := make(unicodeString, end-start+1) |
| 482 | b[0] = unistring.BOM |
| 483 | copy(b[1:], ss) |
| 484 | return b |
| 485 | } |
| 486 | } |
| 487 | as := make([]byte, end-start) |
| 488 | for i, c := range ss { |
| 489 | as[i] = byte(c) |
| 490 | } |
| 491 | return asciiString(as) |
| 492 | } |
| 493 | |
| 494 | func (s unicodeString) String() string { |
| 495 | return string(utf16.Decode(s[1:])) |
nothing calls this directly
no test coverage detected