$bfind » History » Version 12
Per Amundsen, 01/30/2023 08:18 PM
| 1 | 1 | Per Amundsen | _Added in 1.9.0_ |
|---|---|---|---|
| 2 | |||
| 3 | 10 | Per Amundsen | *$bfind(&binvar, N, M, [name])* |
| 4 | 1 | Per Amundsen | |
| 5 | Searches a &binvar for a matching value. |
||
| 6 | |||
| 7 | _The search is case-insensitive._ |
||
| 8 | |||
| 9 | *Parameters* |
||
| 10 | |||
| 11 | &binvar - The &binvar to search. |
||
| 12 | N - The position of the &binvar to start the search. |
||
| 13 | M - Numeric "ASCII":http://www.asciitable.com/ character(s) or text to search. |
||
| 14 | 11 | Per Amundsen | [name] - Name to store in [[$regml]] for the result(s) when using the .regex property. (optional) |
| 15 | 1 | Per Amundsen | |
| 16 | *Properties* |
||
| 17 | |||
| 18 | 4 | Per Amundsen | .text - Force a text search if the search text (M) is a number. |
| 19 | 7 | Per Amundsen | .textcs - Search case-sensitive. |
| 20 | 12 | Per Amundsen | .regex - *TODO* |
| 21 | 1 | Per Amundsen | |
| 22 | *Example* |
||
| 23 | |||
| 24 | <pre> |
||
| 25 | 6 | Per Amundsen | ; Finds "test" starting from position 1. |
| 26 | 1 | Per Amundsen | //echo -a $bfind(&test, 1, test) |
| 27 | |||
| 28 | 6 | Per Amundsen | ; Finds character 32 (a space) from position 5. |
| 29 | 1 | Per Amundsen | //echo -a $bfind(&test, 5, 32) |
| 30 | |||
| 31 | 6 | Per Amundsen | ; Finds WAV from position 1. |
| 32 | 1 | Per Amundsen | //echo -a $bfind(&test, 1, 87 65 86) |
| 33 | </pre> |