Puppet Function: wmflib::ansi::reset

Defined in:
modules/wmflib/functions/ansi/reset.pp
Function type:
Puppet Language

Summary

function to Add a reset code to a string

Overview

wmflib::ansi::reset(String[1] $text)String

SPDX-License-Identifier: Apache-2.0

Parameters:

  • text (String[1])

    the text to wrap

Returns:



4
5
6
7
8
9
# File 'modules/wmflib/functions/ansi/reset.pp', line 4

function wmflib::ansi::reset (
    String[1] $text,
) >> String {
    $reset = "\u001B[0m" # lint:ignore:double_quoted_strings
    $text.stdlib::end_with($reset).bool2str($text, "${text}${reset}")
}