Hello,
1. This issue already exists since at least TSE version 4.40.05
===
2. The order is wrong in both the
a. TSE help example
b. and also in the TSE
read.me file
===
-----------------------------------------------------------------
April 28, 2004 v4.20.05
-----------------------------------------------------------------
v4.20.05
Added:
integer proc @@StrFind(
string s, // string to work on
string find_st, // find this
string opts, // find options (optional)
integer start, // which occurrence (optional)
var integer len) // length of found text (optional)
// returns position of find_st in s
===
4. It should thus be instead in the
read.me file:
Added:
integer proc @@StrFind(
string find_st, // find this
string s, // string to work on
string opts, // find options (optional)
integer start, // which occurrence (optional)
var integer len) // length of found text (optional)
// returns position of find_st in s
---
5. About the issue in the help in TSE:
-Latest TSE version 4.50.19 for Microsoft WindowsL
-TSE version 4.50.14 for Linux WSL
Search in TSE menu > 'Help' > 'Index' for 'StrFind()'
It shows:
BEFORE:
Examples:
--- cut here: begin --------------------------------------------------
// last 6 digits could be any number
string haystack[30] = "B0000123456.msg"
if StrFind(haystack, "B0000.*\.msg", "x)
...
--- cut here: end ----------------------------------------------------
The order of needle and haystack in the example is thus not correct syntax.
It should e.g. be something like the following:
AFTER:
Examples:
--- cut here: begin --------------------------------------------------
proc main()
// last 6 digits could be any number
string needle[30] = "B0000.*\.msg"
string haystack[30] = "B0000123456.msg"
Warn(StrFind(needle, haystack, "x")) // returns 1 (true)
end
--- cut here: end ----------------------------------------------------
Thanks
with friendly greetings
Knud van Eeden