For AI agents: the complete documentation index is available at /en/llms.txt, the full documentation bundle is available at /en/llms-full.txt, and this page is available as Markdown at /en/reference/sdk/logs/functions/padSource.md.
  • English
  • Function: padSource()

    function padSource(s: string, n?: number): string;

    Defined in: logs/format.ts:97

    将 source 来源标识字段右侧填充空格至指定的终端可见宽度。

    Parameters

    ParameterTypeDefault valueDescription
    sstringundefined原始来源标识字符串。
    nnumber7期望对齐的可见字符宽度(默认为 7)。

    Returns

    string

    对齐填充后的字符串。