|
|
AWEstun
|
AWEstun
|
I'm trying to revent control code and the box (contrl-k) symbol in the string. This sort of works, but not always:
var %userbio = $strip($replacex($gettok($6-,-1,35),,),-burcmo)
|
|
|
|
Joined: Oct 2005
Posts: 1,671
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,671 |
$strip(%text) will remove ctrl+ b u r k o (asc: 2, 31, 22, 3, 15)
$strip(%text,b) will remove ctrl+b $strip(%text,u) will remove ctrl+u
etc.
-genius_at_work
|
|
|
|
AWEstun
|
AWEstun
|
This works:
var %userbio = $strip($gettok($6-,-1,35))
but how do I strip out the (multiple) that are left.
|
|
|
|
Joined: Aug 2004
Posts: 7,168
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,168 |
Try var %userbio = $gettok($6-,-1,35)
%userbio = $strip(%userbio)
In theory, what you have shouldn't have any of those control blocks in it, as the start and end control blocks for each part that is being stripped should be removed.
|
|
|
|
AWEstun
|
AWEstun
|
That doesnt work either. Also tried:
$remove(%userbio,)
but that didnt work either.
|
|
|
|
Joined: Aug 2003
Posts: 143
Vogon poet
|
Vogon poet
Joined: Aug 2003
Posts: 143 |
Hi. You need to ue the $chr(nr) off the character. To know the nr off the $chr identifier you need to use $asc(character) them it will return a number... that number is to be used in $chr. Example:.
//echo -s $asc(§)
167
//echo -s $chr(167)
§
them $remove( text, $chr(nr)) good luck
|
|
|
|
AWEstun
|
AWEstun
|
Hi. You need to ue the $chr(nr) off the character. To know the nr off the $chr identifier you need to use $asc(character) them it will return a number... that number is to be used in $chr. Example:.
//echo -s $asc(§)
167
//echo -s $chr(167)
§
them $remove( text, $chr(nr)) good luck I tried: var %userbio = $strip($gettok($6-,-1,35)) var %userbio = $remove(%userbio,$chr(11)) but it's not removing the ctrl-k symbol.
|
|
|
|
Joined: Oct 2005
Posts: 1,671
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,671 |
$chr(11) is not the color control code.
ctrl+__
b= 2 u= 31 r= 22 k= 3 o= 15
Maybe the mutilated server you are on is using different control code characters.
-genius_at_work
|
|
|
|
AWEstun
|
AWEstun
|
$chr(11) is not the color control code.
ctrl+__
b= 2 u= 31 r= 22 k= 3 o= 15
Maybe the mutilated server you are on is using different control code characters.
-genius_at_work It doesn't matter how F'd up the server is, as I'm extracting the infoline and trying to strip codes from with with mIRC. 11 is ctrl-k source: http://www.nthelp.com/ascii.htm
|
|
|
|
Joined: Jan 2004
Posts: 2,081
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,081 |
As he tried to tell you, $chr(11) is NOT the color code!
Try doing:
//echo -s $asc(x)
where you us the ctrl-K in place of the X, and you'll see that it returns 3 and not 11. The color code before the color number is $chr(3) Ctrl-C not the Ctrl-K you entered. You'll find that Ctrl-U puts in a $chr(31) not the $chr(21) you'd expect, etc.
|
|
|
|
AWEstun
|
AWEstun
|
As he tried to tell you, $chr(11) is NOT the color code!
Try doing:
//echo -s $asc(x)
where you us the ctrl-K in place of the X, and you'll see that it returns 3 and not 11. The color code before the color number is $chr(3) Ctrl-C not the Ctrl-K you entered. You'll find that Ctrl-U puts in a $chr(31) not the $chr(21) you'd expect, etc. Well, THANK GOD you jumped in and clearified his post! We need more people like you! Have you considered cloning and/or DNA storage?
|
|
|
|
|
|