anchor.diff:      <<"-!">> = normalize(S4, #{allowed=>[$!], unrecognized=>keep}),
       <<"+!">> = normalize(S4, #{allowed=>[$!], unrecognized=>$+}),
   
  +    <<"abcdef">> = normalize(<<"áBcdÉF">>, #{}),
  +    <<"aBcdEF">> = normalize(<<"áBcdÉF">>, #{not_to_lowercase=>true}),
  +
       [<<"a">>,<<"bcd">>,<<"ef">>] = normalize_words(".  á //   bcd e.f ;;"),
       [<<"a">>,<<"bcd">>,<<"e">>,<<"f">>] = normalize_words(".  á //   bcd e.f ;;", #{allowed=>[$.]}),
  -
  -
  -
       ok.
   
   
  -
   -endif.
   
   
  
positive.code:     binary().
  
  normalize(Text, Opts) ->
      String = norm(nklib_util:to_list(Text), Opts, []),
      list_to_binary(String).
  
  
  %% @private
  norm([], _Opts, Acc) ->
      lists:reverse(string:strip(Acc));
  
  norm([32|T], Opts, Acc) ->
      case maps:get(space, Opts, allowed) of
          allowed ->
              norm(T, Opts, [32|Acc]);
          skip ->
              norm(T, Opts, Acc);
          Char when is_integer(Char) ->
              norm(T, Opts, [Char|Acc])
      end;
  
  %%norm([$_|T], Opts, Acc) ->
  %%    case maps:get(underscore, Opts, $-) of
  %%        allowed ->
  %%            norm(T, Opts, [$_|Acc]);
  %%        skip ->
  %%            norm(T, Opts, Acc);
  %%        Char when is_integer(Char) ->
  %%            norm(T, Opts, [Char|Acc])
  %%    end;
  
  norm([H|T], Opts, Acc) when H >= $0, H =< $9 ->
      norm(T, Opts, [H|Acc]);
  
  norm([H|T], Opts, Acc) when H >= $a, H =< $z ->
      norm(T, Opts, [H|Acc]);
  
  norm([H|T], Opts, Acc) when H >= $A, H =< $Z ->
      norm(T, Opts, [H+32|Acc]);
  
  %% UTF-8
  norm([16#c3, U|T], Opts, Acc) when U >= 16#80, U =< 16#bc->
      L = if
          U >= 16#80, U =< 16#86 -> $a;
          U == 16#87 -> $c;
  
negative.code: 
  -type norm_opts() ::
      #{
          not_to_lowecase => boolean(),
          space => allowed | skip | integer(),
          unrecognized => skip | keep | integer(),
          allowed => [integer()]
  