TSE: StrFind(): Correction necessary

5 views
Skip to first unread message

knud van eeden

unread,
Feb 8, 2026, 1:47:04 PM (11 days ago) Feb 8
to SemWare TSE Pro Text Editor, S.E. Mitchell
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

===

3. See 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:

v4.20.05

  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



Reply all
Reply to author
Forward
0 new messages