text row
This function returns contents of the specified row from the string. For strings containing one single row, only row 0 contains text and all other row numbers return blank contents. In addition, the text can be padded with blanks or truncated if a width limit is specified.
Indirect parameter passing is disabled
2-3
No. | Type | Description |
---|---|---|
1 input |
valid types | input string or value The contents of the specified row will be extracted from this string. |
2 input |
numeral | row number Specify the row number of string to return |
Opt. 3 input |
numeral | width limit Limit the width of the string. If the string is shorter, then it will be padded. No actions if a negative value is provided. Note: Special formatting characters (UNICODE Privat use areas) such as colors or text attributes will be counted as zero width character. Example: &red;. Default value: -1 (no actions) |
Type | Description |
---|---|
string | Extracted row The selected row from the string is returned. |
example[] = """
The quick brown
fox jumps over the great and big, but
lazy dog.""";
echo("Example 1: 2 parameters passed");
for (i[] = 0, i[] < height(example[]), i[]++) echo( 'Row ', i[],': "', text row(example[], i[] ),'"' );
echo(new line, "Example 2: 3 parameters passed");
for (i[] = 0, i[] < height(example[]), i[]++) echo( 'Row ', i[],': "', text row(example[], i[], 18),'"' );
Example 1: 2 parameters passed
Row 0: "The quick brown"
Row 1: "fox jumps over the great and big, but"
Row 2: "lazy dog."
Example 2: 3 parameters passed
Row 0: "The quick brown "
Row 1: "fox jumps over the"
Row 2: "lazy dog. "