mIRC Home    About    Download    Register    News    Help

Print Thread
#48092 08/09/03 08:02 PM
Joined: Sep 2003
Posts: 3
T
TQ_ Offline OP
Self-satisified door
OP Offline
Self-satisified door
T
Joined: Sep 2003
Posts: 3
i need to get the lengh of text/var in bytes but i did not found anything suitable in the help. i tried writing the text in a file and then gettng $bytes(file,b) but it wouldn`t work. any suggestions

#48093 08/09/03 08:42 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
/help $len


Code:
//if ( khaled isgod ) echo yes | else echo no
#48094 08/09/03 08:53 PM
Joined: Sep 2003
Posts: 3
T
TQ_ Offline OP
Self-satisified door
OP Offline
Self-satisified door
T
Joined: Sep 2003
Posts: 3
said I needed length in BYTES

#48095 08/09/03 09:00 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
$bytes($file(file.txt), b)

#48096 08/09/03 09:14 PM
Joined: Sep 2003
Posts: 3
T
TQ_ Offline OP
Self-satisified door
OP Offline
Self-satisified door
T
Joined: Sep 2003
Posts: 3
10x

#48097 08/09/03 09:26 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I'm sorry. 10x?

#48098 08/09/03 11:11 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
...and since 1 character is 1 byte, $len() (which gives the total number of characters in the string) is EXACTLY what you want.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Link Copied to Clipboard