format_string (mixed message, integer format) ⇒ string
Formats a string, message, 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.
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 |

There are no comments on this page.
Comments are welcome and encouraged, including disagreement and critique. However, this is not a space for abuse. Disagreement is welcome; personal attacks, harassment, or hate will be removed instantly. This site reflects personal opinions, not universal truths. If you can’t distinguish between the two, this probably isn’t the place for you.
Comments powered by BalfComment