For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > March 2004 > how to get the buffer size of a string









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author how to get the buffer size of a string
Motherofperls@aol.com

2004-03-18, 6:22 pm

Hi everyone,

Does perl have a function to get the buffer size of a string?

Thanks,
Tricia

Paul Johnson

2004-03-18, 6:22 pm


Motherofperls@aol.com said:

> Does perl have a function to get the buffer size of a string?


length()

perldoc -f length

--
Paul Johnson - paul@pjcj.net
http://www.pjcj.net

Motherofperls@aol.com

2004-03-18, 6:22 pm

length() Returns the length in characters. How do I translate that to bytes?

Bob Showalter

2004-03-18, 6:22 pm

Motherofperls@aol.com wrote:
> length() Returns the length in characters. How do I translate that
> to bytes?


Read 'perldoc bytes' for an example of how to do this.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com