Puppet Function: motd::ansi::reset

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

Summary

function to Add a reset code to a string

Overview

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

SPDX-License-Identifier: Apache-2.0

Parameters:

  • text (String[1])

    the text to wrap

Returns:

  • (String)


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

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