width
This function returns the number of characters in the longest row in the string. If the value provided is not a string, then it will be converted to a string first.
If the string contains no new line symbol, then the total number of characters is returned, like in function length [string function].
Attention: For numerals and dates with available string context, the string will be used.
Indirect parameter passing is disabled
1
No. | Type | Description |
---|---|---|
1 input |
valid types | input string or value Values not of string type will be converted to strings first. Parameter sets will be rejected. |
Type | Description |
---|---|
numeral | Width Number of characters of longest row |
text[] = compose( Hello, new line, Everyone, new line, "!!!" );
echo(text[], new line );
echo( "Width = ", width(text[]), new line, "Length = ", length(text[]) );
Hello
Everyone
!!!
Width = 8
Length = 18