$cb » History » Version 5
Per Amundsen, 11/03/2018 09:56 AM
1 | 1 | Per Amundsen | _Added in 1.9.0_ |
---|---|---|---|
2 | |||
3 | *$cb* |
||
4 | |||
5 | Returns the clipboard contents. |
||
6 | |||
7 | 3 | Per Amundsen | ----------------------------------------------------------------------------- |
8 | |||
9 | 5 | Per Amundsen | *$cb(N,[u,%var|&binvar])* |
10 | 1 | Per Amundsen | |
11 | Returns a line of text from the clipboard. |
||
12 | |||
13 | *Parameters* |
||
14 | |||
15 | 5 | Per Amundsen | N - If N = 0 returns total number of lines in the clipboard, if N = -1 returns all the text in the clipboard, otherwise return the Nth line in the clipboard. |
16 | u - Returns UTF-8 encoded text. (Optional) |
||
17 | %var|&binvar - Results are stored in them and the identifier returns the length of the text. (Optional) |
||
18 | 1 | Per Amundsen | |
19 | *Properties* |
||
20 | |||
21 | 5 | Per Amundsen | .len - If N = 0 or -1 returns total length of all lines in the clipboard otherwise return length of the Nth line. |
22 | 1 | Per Amundsen | |
23 | *Êxample* |
||
24 | |||
25 | <pre> |
||
26 | ;Return number of lines in the clipboard |
||
27 | //echo -ag $cb(0) |
||
28 | |||
29 | ;Return 5th line in the clipboard |
||
30 | //echo -ag $cb(5) |
||
31 | |||
32 | ;Return length of the 5th line in the clipboard |
||
33 | //echo -ag $cb(5).len |
||
34 | </pre> |