mIRC Home    About    Download    Register    News    Help

Print Thread
#48092 08/09/03 08:02 PM
T
TQ_
TQ_
T
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
T
theRat
theRat
T
/help $len

#48094 08/09/03 08:53 PM
T
TQ_
TQ_
T
said I needed length in BYTES

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

#48096 08/09/03 09:14 PM
T
TQ_
TQ_
T
10x

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

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


Link Copied to Clipboard