MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / padText

Function padText

cli/src/utils/markdown-renderer.tsx:701–705  ·  view source on GitHub ↗
(text: string, targetWidth: number)

Source from the content-addressed store, hash-verified

699 * Pads text to reach exact width using spaces.
700 */
701const padText = (text: string, targetWidth: number): string => {
702 const currentWidth = stringWidth(text)
703 if (currentWidth >= targetWidth) return text
704 return text + ' '.repeat(targetWidth - currentWidth)
705}
706
707const renderTable = (table: Table, state: RenderState): ReactNode[] => {
708 const { palette, nextKey, codeBlockWidth } = state

Callers 1

renderTableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected