(line: string, startCol: number, length: number, strict = false)
| 1081 | * @param strict - If true, exclude wide chars at boundary that would extend past the range |
| 1082 | */ |
| 1083 | export function sliceByColumn(line: string, startCol: number, length: number, strict = false): string { |
| 1084 | return sliceWithWidth(line, startCol, length, strict).text; |
| 1085 | } |
| 1086 | |
| 1087 | /** Like sliceByColumn but also returns the actual visible width of the result. */ |
| 1088 | export function sliceWithWidth( |
no test coverage detected