Jump to content

Get the size in bytes for a string


photo

Recommended Posts

Hello

 

 

Is there a way to get the size of a string in bytes?

While strlen and utf8strlen only return the length of a string, it would be useful to get the real size in bytes of the string.

While uft-8 characters can have a different size, there is no easy way to calculate the size in bytes.

 

 

Thanks a lot

Manuel

Link to comment
×
×
  • Create New...