Strcmp

strcmp(<<>>, <<>>) -> 0;
strcmp(<<>>, <<_A:1/binary, _Rest/binary>>) -> -1;
strcmp(<<_A:1/binary, _Rest/binary>>, <<>>) -> 1;
strcmp(<<A:1/binary, Rest/binary>>, <<A:1/binary, Rest2/binary>>) -> strcmp(Rest, Rest2);
strcmp(<<A:1/binary, _Rest/binary>>, <<B:1/binary, _Rest2/binary>>) when A < B -> - 1;
strcmp(<<_A:1/binary, _Rest/binary>>, <<_B:1/binary, _Rest2/binary>>) -> 1.
 
11
Kudos
 
11
Kudos