Skip to main content
Module

x/indent_and_wrap/mod.ts>calcLines

Finds and replaces common indent in text, and hard-wraps text.
Go to Latest
function calcLines
import { calcLines } from "https://deno.land/x/indent_and_wrap@v0.0.5/mod.ts";

Count number of lines in text string, and determine column number after the last character. This function only considers text substring from from to to.

Parameters

text: string
optional
options: CalcLinesOptions
optional
from = [UNSUPPORTED]
optional
to = [UNSUPPORTED]