n9mfk9 Posted May 25, 2007 Share 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 Link to comment Share on other sites More sharing options...
Administrators Jon Posted May 25, 2007 Administrators Share 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. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Administrators Jon Posted May 25, 2007 Administrators Share 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 Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
n9mfk9 Posted May 25, 2007 Author Share Posted May 25, 2007 thanks jon that did it I was look for the d thanks Link to comment Share on other sites More sharing options...
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