(text: string, textWidth: number)
| 11 | } |
| 12 | |
| 13 | export function getNumRows(text: string, textWidth: number): number { |
| 14 | return text |
| 15 | .split("\n") |
| 16 | .map((t) => Math.ceil((t.length + 1) / textWidth)) |
| 17 | .reduce((a, b) => a + b); |
| 18 | } |
| 19 | |
| 20 | export function removeEmptyCharacters(text: string): string { |
| 21 | return text.replace("\u0000", ""); |
nothing calls this directly
no outgoing calls
no test coverage detected