Project

General

Profile

$bfind » History » Version 13

Per Amundsen, 01/30/2023 09:59 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 13 Per Amundsen
.regextext - Performs a [[Scripting_Regex|regular expression]] search for the pattern *M* on UTF8 encoded text from the binvar.
22 1 Per Amundsen
23
*Example*
24
25
<pre>
26 6 Per Amundsen
; Finds "test" starting from position 1.
27 1 Per Amundsen
//echo -a $bfind(&test, 1, test)
28
 
29 6 Per Amundsen
; Finds character 32 (a space) from position 5.
30 1 Per Amundsen
//echo -a $bfind(&test, 5, 32)
31
32 6 Per Amundsen
; Finds WAV from position 1.
33 1 Per Amundsen
//echo -a $bfind(&test, 1, 87 65 86)
34
</pre>