【Erl代码片段】cowboy的一处大小写处理代码
在cowboy的库cowlib中的cow_inline.hrl文件看到一堆很长的宏:
-define(INLINE_LOWERCASE(Function, Rest, Acc),
$A -> Function(Rest, << Acc/binary, $a >>);
$B -> Function(Rest, << Acc/binary, $b >>);
$C -> Function(Rest, << Acc/binary, $c >>);
$D -> Function(Rest, << Acc/binary, $d >>);
$E -> Function(Rest, << Acc/binary, $e >>);
$F -> Function(Rest, << Acc/binary, $f >>);
$G -> Function(Rest, << Acc/binary …