Sign in to follow this  
Followers 0
ddeerr

StringInStr pb

5 posts in this topic

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 = 0

same with -10 or -2 ...

You surely know how to use it correctly, help plz.

Tx


MsgBox(0, "Steven Seagal", "Les poches bourrées de Pesos")

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

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 ^^


MsgBox(0, "Steven Seagal", "Les poches bourrées de Pesos")

Share this post


Link to post
Share on other sites

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....

Share this post


Link to post
Share on other sites

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


MsgBox(0, "Steven Seagal", "Les poches bourrées de Pesos")

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0