Jamie Balfour

Welcome to my personal website.

Find out more about me, my personal projects, reviews, courses and much more here.

Official ZPE/YASS documentationformat_string

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
Feedback 👍
Comments are sent via email to me.