$strip » History » Version 1
Per Amundsen, 08/10/2015 08:25 AM
1 | 1 | Per Amundsen | _Added in 1.8.10_ |
---|---|---|---|
2 | |||
3 | *$strip(text,[burcmo])* |
||
4 | |||
5 | Returns text with all [[Formatting_Text|control codes]] stripped out. |
||
6 | |||
7 | *Parameters* |
||
8 | |||
9 | text - The text to format. |
||
10 | |||
11 | [burcmo] - If specified, only strip these codes, b = bold, u = underline, r = reverse, c = colors, m/o = use global strip options from [[Options_Dialog|Options]] -> [[Options_Messages|Messages]]. |
||
12 | |||
13 | *Example* |
||
14 | |||
15 | <pre> |
||
16 | ; Strip all codes. |
||
17 | //echo -ag $strip($chr(3) $+ 3,3text) |
||
18 | |||
19 | |||
20 | ; Use global option to strip codes. |
||
21 | //echo -ag $strip($chr(3) $+ 3,3text, m) |
||
22 | |||
23 | ; Strip only bold and color codes |
||
24 | //echo -ag $strip($chr(2) $+ $chr(29) $+ $chr(3) $+ 3,3text,bc) |
||
25 | </pre> |