(text string, limit int)
| 572 | if len([]rune(current)) > budget.MaxChars { |
| 573 | return firstRunes(current, budget.MaxChars), true |
| 574 | } |
| 575 | for _, chunk := range chunks[1:] { |
| 576 | piece := *preserveSeparator + chunk |
| 577 | if len([]rune(current+piece)) > budget.MaxChars { |
| 578 | return current, true |
| 579 | } |
| 580 | current += piece |
| 581 | } |
| 582 | return current, true |
| 583 | } |
| 584 | } |
| 585 | return firstRunes(candidate, budget.MaxChars), true |
| 586 | } |
no outgoing calls
no test coverage detected