[erlang-questions] STRCMP or something like that

Evren Bayraktar <>
Mon Dec 24 15:28:09 CET 2012


Hi everyone,

I'm having trouble with Erlang  I hope someone can help me. I'm really
newbie in Erlang :)

I need to something like strcmp in php.

For example;

I have a two different string, Alicia and Alex. I need to steady order for
them. By parsing each letter I guess I can do that.

$A. returns 65 so I can't compare with first letters then $l. returns 108
but they are same too.
Now, $e. returns 101 and $i. returns 105. By using this numbers I can give
correct order, first Alex then Alica.

I mean, imagine a function which compare two different variable, by using
their ascii codes it will return
correct order.

Function("alicia", "alex") ---> will return alex+alicia

I hope someone will help me

Best Regards
Evren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20121224/abb60fe3/attachment.html>


More information about the erlang-questions mailing list