MCPcopy Create free account
hub / github.com/Superflows-AI/superflows / getNumRows

Function getNumRows

lib/utils.ts:13–18  ·  view source on GitHub ↗
(text: string, textWidth: number)

Source from the content-addressed store, hash-verified

11}
12
13export 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
20export function removeEmptyCharacters(text: string): string {
21 return text.replace("\u0000", "");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected