height
This function returns the number rows the string is requiring. Empty strings and strings without line breaks (new line character) are considered 1 row, even if
exotic UNICODE form feed or line break characters are inside. Clean them up first. Every new line character inside the string increases the height by 1,
even if the new line character is at the end of the string.
Parmater of other types will be converted to strings first and then checked.
Indirect parameter passing is disabled
1
No. | Type | Description |
---|---|---|
1 input |
valid types | input string or value Values not of string type return height = 1 |
Type | Description |
---|---|
numeral | Height Number of rows needed |
echo( "Height 1 = ", height ( 123.45 ) );
echo( "Height 2 = ", height ( { One element, With line break + new line } ) ); // Height = 2
echo( "Height 3 = ", height ( compose( Hello, new line, Everyone, new line, "!!!" ) ) );
Height 1 = 1
Height 2 = 2
Height 3 = 3