[erlang-questions] Is it len/1 or length/1?

Magnus Klaar magnus.klaar@REDACTED
Fri Nov 25 17:09:11 CET 2011


Hi!

This is not the same function as the length/1 BIF exported by the erlang
module. It's just an alias for the length/1 function that must be called as
string:len(String) wheras the length/1 function can be called as either
length(String) and erlang:length(String).

It has no purpose other than to declare the intention that you want to
compute the length of a term that is a list of integers within a specific
range.

/ Magnus

On Fri, Nov 25, 2011 at 4:40 PM, Ian <hobson42@REDACTED> wrote:

> Hi All,
>
> This page http://www.erlang.org/doc/man/**string.html#len-1<http://www.erlang.org/doc/man/string.html#len-1>
>
> appears to say that the function to return the length of a string is len/1
>
> But it isn't, its length/1
>
> Clearly I have misunderstood something. What?
>
> Thanks
>
> Ian
> ______________________________**_________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/**listinfo/erlang-questions<http://erlang.org/mailman/listinfo/erlang-questions>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111125/2501e59f/attachment.htm>


More information about the erlang-questions mailing list