ddeerr Posted November 18, 2006 Share Posted November 18, 2006 Hi,I'm surely a noob again but i cannot use as i want this fonction.I would use the option to beginning search from the right side but it doesn't work :occurrence [optional] Which occurrence of the substring to find in the string. Use a negative occurrence to search from the right side. The default value is 1 (finds first occurrence). I simply test with help example :like that :$result = StringInStr("I am a String", "RING", 1, -1) MsgBox(0, "Search result:", $result)oÝ÷ Ú·¬º[result = 0same with -10 or -2 ...You surely know how to use it correctly, help plz.Tx Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 18, 2006 Share Posted November 18, 2006 Your saying for it to be case sensitive StringInStr ( "string", "substring" [, casesense [, occurrence]] ) [optional] Flag to indicate if the operations should be case sensitive. 0 = not case sensitive (default) 1 = case sensitive Link to comment Share on other sites More sharing options...
ddeerr Posted November 18, 2006 Author Share Posted November 18, 2006 Your saying for it to be case sensitive StringInStr ( "string", "substring" [, casesense [, occurrence]] ) [optional] Flag to indicate if the operations should be case sensitive. 0 = not case sensitive (default) 1 = case sensitive Big TX for quick reply but it is already case sensitive i'll test again and if i put this code : $result = StringInStr("I am a String", "IN", 0, -1) MsgBox(0, "Search result:", $result)oÝ÷ Ú+p¢¹,nëg¢ÛaÊ'y«¢+ØÀÌØíÉÍÕ±ÐôMÑÉ¥¹%¹MÑÈ ÅÕ½Ðí$´MÑÉ¥¹ÅÕ½Ðì°ÅÕ½Ðí%8ÅÕ½Ðì°Ä°´Ä¤)5Í ½à À°ÅÕ½ÐíMÉ ÉÍÕ±ÐèÅÕ½Ðì°ÀÌØíÉÍձФoÝ÷ Ú+]¡ë'ßÛjëú+qç±ëÈ÷+(çhzÉ÷öÜ(®Kh¡«¢+ØÀÌØíÉÍÕ±ÐôMÑÉ¥¹%¹MÑÈ ÅÕ½Ðí$´MÑÉ¥¹ÅÕ½Ðì°ÅÕ½Ðí9$ÅÕ½Ðì°Ä°´Ä¤)5Í ½à À°ÅÕ½ÐíMÉ ÉÍÕ±ÐèÅÕ½Ðì°ÀÌØíÉÍձФ but i can understand that ^^ Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 18, 2006 Share Posted November 18, 2006 yes they dont work cuz the 1 paramater is saying if it finds capital NI, and why are you declaring a -1 default? meaning first occurance.... Link to comment Share on other sites More sharing options...
ddeerr Posted November 18, 2006 Author Share Posted November 18, 2006 Noob Power + 1 :"> It's ok now The probelm was when is used StringTrimRight after before i did that : $result = 'C:\Documents and Settings\_-_DyeziDEE_-_\Application Data\Opera\Opera9\profile\widgets\simaquarium-1_03.zip</value>' $i = StringInStr($result, "\", 1, -1) $result = StringTrimRight($result, $i) MsgBox(0, "Search result:", $result)oÝ÷ Úz0¶jëh×6$result = 'C:\Documents and Settings\_-_DyeziDEE_-_\Application Data\Opera\Opera9\profile\widgets\simaquarium-1_03.zip</value>' $i = StringInStr($result, "\", 1, -1) $i = StringLen($result) - $i + 1 $result = StringTrimRight($result, $i) ; get the current widget path MsgBox(0, "Search result:", $result) ... tx 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