HI,
I think I found a little problem with strSearch. See the following code snippet.
setvar [stringToSearch] "abc"
setvar [sourceString] ""
StrSearch "[stringToSearch]" "[sourceString]" [result]
typeof [result] [typeOfResult]
jsalert "Result is: [result] and type of result is:[typeOfResult]"
If the string to search ([sourceString]) is empty, the search does not return -1 (as you would expect) but returns an empty string. This could lead to malfunctions.
I hope it helps someone.
Greetings
Rocco
HI,
I think I found a little problem with strSearch. See the following code snippet.
setvar [stringToSearch] "abc"
setvar [sourceString] ""
StrSearch "[stringToSearch]" "[sourceString]" [result]
typeof [result] [typeOfResult]
jsalert "Result is: [result] and type of result is:[typeOfResult]"
If the string to search ([sourceString]) is empty, the search does not return -1 (as you would expect) but returns an empty string. This could lead to malfunctions.
I hope it helps someone.
Greetings
Rocco
luishp has reacted to this post.