Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/indent_and_wrap/private/indent.ts>getTextRect

Finds and replaces common indent, hard-wraps text, generates text tables and table-based complex text layouts. Can work on text that contains terminal escape sequences.
Latest
function getTextRect
import { getTextRect } from "https://deno.land/x/indent_and_wrap@v0.0.17/private/indent.ts";

This function works the same as indentAndWrap(), but it doesn't return resulting text, but it returns number of lines and columns the result occupies. It only counts columns on non-blank lines.

Parameters

text: string
optional
options: GetTextRectOptions
optional
knownCommonIndent: string