Home
About
Download
Register
News
Help
Register
Log In
Forums
Scripts & Popups
instr
Forums
Active Threads
Search
Who's Online
Help
Print Thread
instr
#
32860
29/06/03
04:15 AM
S
sorex
sorex
S
Hello,
is there some sort of instr function to determin where in a string a specific character or text is?
i mean this
set %xpos = instr($1,"test")
/msg $me $right($1,$len($1)-xpos)
to give " string" where the inpunt was "this is a test string"
Copy Link to Clipboard
Re: instr
#
32861
29/06/03
04:38 AM
S
ScatMan
ScatMan
S
i think u meant $pos
//echo -a $pos(this is a test string,string)
will return the position of "string" in the text which is 16
Copy Link to Clipboard
Re: instr
#
32862
29/06/03
05:38 AM
S
sorex
sorex
S
thanks, that's what I was after
any idea how you can use a double quote inthere?
$left($1-,$calc($pos($1-, " text,1)))
Copy Link to Clipboard
Re: instr
#
32863
29/06/03
05:57 AM
S
ScatMan
ScatMan
S
of course u can, it's not like in other languages that u have to put a string inside quotes
Copy Link to Clipboard
Re: instr
#
32864
29/06/03
06:02 AM
S
sorex
sorex
S
when i do this i get nothing
echo 5 # $pos($1-," )
it doesn't seem to handle double quotes
Copy Link to Clipboard
Re: instr
#
32865
29/06/03
06:05 AM
Joined:
Dec 2002
Posts: 3,015
London, UK
C
Collective
Hoopy frood
Collective
Hoopy frood
C
Joined:
Dec 2002
Posts: 3,015
London, UK
//echo -a $pos(lalala"aaa,")
works fine for me..
Copy Link to Clipboard
Re: instr
#
32866
29/06/03
06:56 AM
S
sorex
sorex
S
thanks again, small typo in my code
Copy Link to Clipboard
Hop To
News and Discussions ------
Latest News
General Discussion
Support ------
mIRC Help
Connection Issues
Scripts & Popups
Development ------
Feature Suggestions
Developers
Bug Reports
Print Thread
Switch to Threaded Mode
Show Likes
Link Copied to Clipboard
View Profile
Private Message
Follow User
Forum Posts
Forum Rules
·
Mark All Read
Contact Us
·
Help
·
mIRC Homepage