Loading ...
Sorry, an error occurred while loading the content.

22619StrPos returns -1 in V7pr5 instead of 0

Expand Messages
  • joy8388608
    Apr 18, 2012
    • 0 Attachment
      Can someone give me an example of the new syntax for StrPos?
      Would it be ^$StrPos("x";"wxyz";I)$ ?

      If so, what about the older syntax ^$StrPos("SubStr";"Str";CaseSensitive)$ ?

      I just noticed StrPos returned 0 if no match in V6 but returns -1 if no match in V7pr5 when using the V6 syntax. Intentional? If so, why? This is going to break a few clips.

      ; Examine entire document text and look for the first TAB
      ^!Prompt StrPos returns ^$StrPos("^%TAB%";"^$GetText$";False)$


      C: Searches for whole words only.
      I: Ignores character case.
      R: Specifies that the search criteria represents a regular expression
      *: Specifies that the search criteria uses wildcards.
      A: Use to replace all matched occurrences with ^$StrReplace. When this option is not used, only the first match is replaced.

    • Show all 4 messages in this topic