A
A
artem782014-09-03 15:44:27
Perl
artem78, 2014-09-03 15:44:27

How to get the size of a string in characters and bytes in Perl?

Some sources indicate that the length() function returns the number of characters, others - bytes.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jonh Doe, 2014-09-03
@CodeByZen

If the string is in ascii, then it is true, if the string can contain unicode, then length will not work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question