Files
letta-code/src/cli/helpers/asciiUtils.ts
2025-10-27 14:25:03 -07:00

13 lines
370 B
TypeScript

/**
* Calculates the maximum width of a multi-line ASCII art string.
* @param asciiArt The ASCII art string.
* @returns The length of the longest line in the ASCII art.
*/
export function getAsciiArtWidth(asciiArt: string): number {
if (!asciiArt) {
return 0;
}
const lines = asciiArt.split("\n");
return Math.max(...lines.map((line) => line.length));
}