anchor.diff:  -module(nklib_unparse).
   -author('Carlos Gonzalez <carlosj.gf@gmail.com>').
   
  --export([uri/1, uri2/1, token/1, header/1, capitalize/1]).
  +-export([uri/1, uri2/1, uri3/1, token/1, header/1, gen_opts/1]).
   
   -include("nklib.hrl").
   
  
positive.code:     gen_headers(Rest, [[$&, nklib_util:to_binary(K)] | Acc]).
  
  
  % @private 
  capitalize(Name) ->
      capitalize(nklib_util:to_binary(Name), true, <<>>).
  
  
  % @private 
  capitalize(<<>>, _, Acc) ->
      Acc;
  
  capitalize(<<$-, Rest/bits >>, _, Acc) ->
      capitalize(Rest, true, <<Acc/binary, $->>);
  
  capitalize(<<Ch, Rest/bits>>, true, Acc) when Ch>=$a, Ch=<$z ->
      capitalize(Rest, false, <<Acc/binary, (Ch-32)>>);
  
  capitalize(<<Ch, Rest/bits>>, true, Acc) ->
      capitalize(Rest, false, <<Acc/binary, Ch>>);
  
  capitalize(<<Ch, Rest/bits>>, false, Acc) ->
      capitalize(Rest, false, <<Acc/binary, Ch>>).
  
  
  
  
negative.code: 
  join([A], Acc) ->
      lists:reverse([A|Acc]).
  
  
  
  