Project

General

Profile

$wrap » History » Version 6

Per Amundsen, 02/23/2023 07:57 PM

1 1 Per Amundsen
_Added in 3.3_
2
3
*$wrap(text, font, size, width, [word,] N)*
4
5
Returns the Nth line in text wrapped to the specified width in pixels.
6
7
*Parameters*
8
9 6 Per Amundsen
table(ktable).
10
|*Parameter*|*Description*|
11
| text | The text to wrap. |
12
| font | The font to wrap with. |
13
| size | The font size to wrap with. |
14
| width | The width in pixels for the area to wrap to. |
15
| [word] | If specified with "1" or word is not specified, the wrapping is performed on whole words, otherwise performed on max length. |
16
| N | If N = 0 number of wrapped lines, otherwise the Nth wrapped line. |
17 1 Per Amundsen
18
*Properties*
19
20 6 Per Amundsen
table(ktable).
21
|*Property*|*Description*|
22
| .cc | Retain the control used for the previous line. *(AdiIRC only)* |
23 3 Per Amundsen
24 1 Per Amundsen
*Example*
25
26
<pre>
27
; Show number of wrapped line for this text.
28
//echo -ag Number of wrapped lines is $wrap(veeeeeeerrrrrry long line, verdana, 9, 100, 0)
29
30
; Show the first wrapped line for this text.
31
//echo -ag The first wrapped line is $wrap(veeeeeeerrrrrry long line, verdana, 9, 100, 1)
32
</pre>