Home
About
Download
Register
News
Help
Register
Log In
Forums
Scripts & Popups
String splitting
Forums
Active Threads
Search
Who's Online
Help
Print Thread
String splitting
#
123917
29/06/05
03:14 AM
Joined:
Jun 2005
Posts: 44
B
BNX
OP
Ameglian cow
OP
BNX
Ameglian cow
B
Joined:
Jun 2005
Posts: 44
How would I take a character string, or a variable and split each character up into its own variable?
Example
from:
%var = CAT
to:
%var.1 = C
%var.2 = A
%var.3 = T
you guys are too much help
Last edited by BNX;
29/06/05
03:15 AM
.
Copy Link to Clipboard
Re: String splitting
#
123918
29/06/05
03:17 AM
Joined:
Dec 2002
Posts: 3,138
London, UK
C
Collective
Hoopy frood
Collective
Hoopy frood
C
Joined:
Dec 2002
Posts: 3,138
London, UK
Code:
unset %split.* var %i = 1 while ( %i <= $len($1-) ) { set $+(%,split.,%i) $mid($1-,%i,1) inc %i }
If $1- was "a b c def" you would get:
%split.1 a
%split.2
%split.3 b
%split.4
%split.5 c
%split.6
%split.7 d
%split.8 e
%split.9 f
Copy Link to Clipboard
Re: String splitting
#
123919
29/06/05
03:34 AM
Joined:
Jun 2005
Posts: 44
B
BNX
OP
Ameglian cow
OP
BNX
Ameglian cow
B
Joined:
Jun 2005
Posts: 44
thanks
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
View Profile
Private Message
Follow User
Forum Posts
View Profile
Private Message
Follow User
Forum Posts
Forum Rules
·
Mark All Read
Contact Us
·
Help
·
mIRC Homepage