Home
About
Download
Register
News
Help
Register
Log In
Forums
Scripts & Popups
Striping codes from variable...
Forums
Active Threads
Search
Who's Online
Help
Print Thread
Striping codes from variable...
#
110612
08/02/05
10:06 PM
Joined:
Jan 2005
Posts: 28
G
Godlike
OP
Ameglian cow
OP
Godlike
Ameglian cow
G
Joined:
Jan 2005
Posts: 28
I have a text in a variable how can i strip all codes from it...
bold,color,underline....
Copy Link to Clipboard
Re: Striping codes from variable...
#
110613
08/02/05
10:07 PM
Joined:
Nov 2003
Posts: 2,327
T
tidy_trax
Hoopy frood
tidy_trax
Hoopy frood
T
Joined:
Nov 2003
Posts: 2,327
$strip(%var)
New username: hixxy
Copy Link to Clipboard
Re: Striping codes from variable...
#
110614
08/02/05
10:13 PM
Joined:
Jan 2005
Posts: 28
G
Godlike
OP
Ameglian cow
OP
Godlike
Ameglian cow
G
Joined:
Jan 2005
Posts: 28
How can i use this forward then?
or can i use this already in /set cmd ?
Copy Link to Clipboard
Re: Striping codes from variable...
#
110615
08/02/05
10:16 PM
Joined:
Nov 2003
Posts: 2,327
T
tidy_trax
Hoopy frood
tidy_trax
Hoopy frood
T
Joined:
Nov 2003
Posts: 2,327
If you want to set the new contents of %var to the old contents with no colour codes, use this:
Code:
//set %var $strip(%var)
New username: hixxy
Copy Link to Clipboard
Re: Striping codes from variable...
#
110616
08/02/05
10:19 PM
Joined:
Jan 2005
Posts: 28
G
Godlike
OP
Ameglian cow
OP
Godlike
Ameglian cow
G
Joined:
Jan 2005
Posts: 28
thx works....
One more thing i have in %var like this
[word] how can i throw away those [], but when i get the something to the var it`s not always same length it could be also [something] and i would like only that something out of it...
Copy Link to Clipboard
Re: Striping codes from variable...
#
110617
08/02/05
11:10 PM
Joined:
Nov 2003
Posts: 2,327
T
tidy_trax
Hoopy frood
tidy_trax
Hoopy frood
T
Joined:
Nov 2003
Posts: 2,327
Code:
//set %var $mid(%var,2,$calc($len(%var) - 2))
New username: hixxy
Copy Link to Clipboard
Re: Striping codes from variable...
#
110618
08/02/05
11:19 PM
Joined:
Dec 2002
Posts: 2,962
Norwich, UK
S
starbucks_mafia
Hoopy frood
starbucks_mafia
Hoopy frood
S
Joined:
Dec 2002
Posts: 2,962
Norwich, UK
Code:
$mid(%var,2,-1)
Good old negative indices.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
Copy Link to Clipboard
Re: Striping codes from variable...
#
110619
08/02/05
11:50 PM
Joined:
Nov 2003
Posts: 2,327
T
tidy_trax
Hoopy frood
tidy_trax
Hoopy frood
T
Joined:
Nov 2003
Posts: 2,327
Ah, I knew $left and $right supported negative indexes but I wasn't sure about $mid, thanks.
New username: hixxy
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
View Profile
Private Message
Follow User
Forum Posts
View Profile
Private Message
Follow User
Forum Posts
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