n9mfk9 Posted May 25, 2007 Posted May 25, 2007 Hi all, I have a question about StringInStr here is my test code $location = StringInStr("How much wood" , "wood", 0, 1) MsgBox(0,"",$location) this gives me 10 is there a switch or something to make StringInStr go to the right insted of the left thanks for any help
Administrators Jon Posted May 25, 2007 Administrators Posted May 25, 2007 Hi all, I have a question about StringInStr here is my test code $location = StringInStr("How much wood" , "wood", 0, 1) MsgBox(0,"",$location) this gives me 10 is there a switch or something to make StringInStr go to the right insted of the left thanks for any help -1 for the last parameter.
Administrators Jon Posted May 25, 2007 Administrators Posted May 25, 2007 -1 for the last parameter.Or do you mean you want the position of the "d"? Edit: In which case: $location = StringInStrEnd("How much wood" , "wood", 0, 1) MsgBox(0,"",$location) Func StringInStrEnd($string, $search, $case, $occur) $pos = StringInStr($string, $search, $case, $occur) If $pos Then $pos = $pos + StringLen($search) return $pos EndFunc
n9mfk9 Posted May 25, 2007 Author Posted May 25, 2007 thanks jon that did it I was look for the d thanks
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now