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/stripAnsi.md.
  • English
  • Function: stripAnsi()

    function stripAnsi(s: string): string;

    Defined in: logs/ansi.ts:26

    移除字符串中包含的所有 ANSI 转义码。

    Parameters

    ParameterTypeDescription
    sstring原始字符串。

    Returns

    string

    去除 ANSI 转义序列后的纯文本字符串。