To use this website fully, you first need to accept the use of cookies. By agreeing to the use of cookies you consent to the use of functional cookies. For more information read this page.

Official ZPE/YASS documentationformat_string

format_string (mixed message, integer format) ⇒ string

Formats a string using the standard output of the current console. If the FORCE_COLOUR setting is set to false this function will simply return the original string.

First available: Version 1.9.9

Notes

This function uses the ANSI-based command line format strings to format the input string.

The function works only on Unix-like, BSD and macOS based architectures and is not expected to work on any non-ANSI compatible terminal. It also does not function correctly when used in the GUI mode provided by the ZPE package.

Supplied formats available

The following table describes the formats available:

Code Format
0 Nothing
1 Formats text to green
2 Formats text to blue
3 Formats text to red
4 Formats text to cyan
5 Formats text to magenta
6 Formats text to yellow
Comments

There are no comments on this page.

New comment
Reply
Code previewClose
Feedback 👍
Comments are sent via email to me.