Bug in string.erl
Fri Nov 7 16:38:29 CET 2003
> Yes it is defintely a bug. The problem is that I was trying to be nice in the case where the desried substring length is longer than the remaining string inwhich case the substring just gets the remaining characters. So
> string:substr("abcd", 2, 5) -> "cd"
> The second should of course be:
> substr1(String, L) when list(String) -> . %Be nice!
My goodness - I didn't realise you'd written the code - there was a
comment in it :-)
More information about the erlang-questions