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.
Vectorization: This function supports vectorization in the 1st function parameter.
Instead of providing a single value, you can provide a set or even a nested set which contain multiple values.
The function will then process every value and its return value contains a corresponding set containing all results.
Indirect parameter passing is disabled
Vectorization is allowed in the 1st function parameter
1
No. | Type | Description |
---|---|---|
1 input |
valid types set |
input string or value Values not of string type return height = 1. Vectorization applies if a set is provided. |
Type | Description |
---|---|
numeral set |
Height(s) Number of rows needed. In case of vectorization being used, a set containing the results is returned |
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 = {1,2}
Height 3 = 3