String utf8 size in kilobytes

  • Thread starter daniel wijnands
  • Start date
D

daniel wijnands

I have a mimemessage in a string.
This string is utf8, i would like to know the size of this string.
String.size gives me the length in characters, but i need the size in kb
or bytes
 
A

Andreas S.

daniel said:
I have a mimemessage in a string.
This string is utf8, i would like to know the size of this string.
String.size gives me the length in characters, but i need the size in kb
or bytes

String#size returns the size in bytes. String#jsize returns the number
of characters (with require 'jcode').
 
D

daniel wijnands

Thanks, then my method is valid, i want to know the bytes, so that's
fine :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top