typeToString()
typeToString(mixed $val) : string
Parameters
mixed | $val |
Class FormatUtil
wrapText(string $text, integer $indent, integer $width) : string
Word wrap text with indentation to fit the screen size
If screen size could not be detected, or the indentation is greater than the screen size, the text will not be wrapped.
The first line will not be indented, so wrapText("Lorem ipsum dolor sit amet.", 4)
will result in the
following output, given the screen width is 16 characters:
Lorem ipsum
dolor sit
amet.
string | $text | the text to be wrapped |
integer | $indent | number of spaces to use for indentation. |
integer | $width |
the wrapped text.