anchor.diff:  %% interface functions
   -export([
       x/0,
  -         trim/1,
  -         trim_left/1,
  -         trim_right/1,
  -         trim/2,
  -         trim_left/2,
  -         trim_right/2,
  -         trim_left_func/2,
  -         is_string/1,
  -         first_char/1,
  -         last_char/1,
  -         unquote/1,
  -         unquote/2,
  -         nospaces/1,
  -         line/1,
  -         to_rootname/1,
  -         to_name/1,
  -         to_slug/1,
  -         to_lower/1,
  -         to_upper/1,
  -         replace/3,
  -         sanitize_utf8/1,
  -         truncate/2,
  -         truncate/3,
  -         truncatewords/2,
  -         truncatewords/3,
  -         split_lines/1,
  -         escape_ical/1,
  -         starts_with/2,
  -         ends_with/2,
  -         contains/2,
  -         split/2,
  -         concat/2
  -        ]).
  +    trim/1,
  +    trim_left/1,
  +    trim_right/1,
  +    trim/2,
  +    trim_left/2,
  +    trim_right/2,
  +    trim_left_func/2,
  +    is_string/1,
  +    first_char/1,
  +    last_char/1,
  +    unquote/1,
  +    unquote/2,
  +    nospaces/1,
  +    line/1,
  +    len/1,
  +    to_rootname/1,
  +    to_name/1,
  +    to_slug/1,
  +    to_lower/1,
  +    to_upper/1,
  +    replace/3,
  +    sanitize_utf8/1,
  +    truncate/2,
  +    truncate/3,
  +    truncatewords/2,
  +    truncatewords/3,
  +    split_lines/1,
  +    escape_ical/1,
  +    starts_with/2,
  +    ends_with/2,
  +    contains/2,
  +    split/2,
  +    concat/2
  +]).
   
   
   x() ->
  
positive.code: %% @doc Remove whitespace at the start and end of the string
  -spec trim(binary()|list()) -> binary()|list().
  trim(B) when is_binary(B) ->
  	trim_right(trim_left(B));
  trim(L) when is_list(L) ->
  	binary_to_list(trim(iolist_to_binary(L))).
  
  %% @doc Remove all occurences of a character at the start and end of a string.
  -spec trim(binary()|list(), integer()) -> binary()|list().
  trim(B, Char) when is_binary(B) ->
  	trim_right(trim_left(B, Char), Char);
  trim(L, Char) when is_list(L) ->
  	binary_to_list(trim(iolist_to_binary(L), Char)).
  
  
  %% @doc Remove whitespace at the start the string
  
negative.code: 
  %% @doc Split the binary into lines. Line separators can be \r, \n or \r\n.
  split_lines(B) when is_binary(B) ->
      split_lines(B, <<>>, []).
      
      split_lines(<<>>, Line, Acc) ->
          lists:reverse([Line|Acc]);
      split_lines(<<13,10,Rest/binary>>, Line, Acc) ->
          split_lines(Rest, <<>>, [Line|Acc]);
      split_lines(<<13,Rest/binary>>, Line, Acc) ->
          split_lines(Rest, <<>>, [Line|Acc]);
      split_lines(<<10,Rest/binary>>, Line, Acc) ->
          split_lines(Rest, <<>>, [Line|Acc]);
      split_lines(<<C, Rest/binary>>, Line, Acc) ->
          split_lines(Rest, <<Line/binary, C>>, Acc).
  
  
  %% @doc Escape special characters for ical RFC2445 elements
  escape_ical(L) when is_list(L) ->
      escape_ical(iolist_to_binary(L));
  escape_ical(B) when is_binary(B) ->
      escape_ical(B, <<>>, 0);
  escape_ical(A) when is_atom(A) ->
      escape_ical(atom_to_list(A)).
  
      escape_ical(<<>>, Acc, _N) -> Acc;
      escape_ical(B, Acc, N) when N >= 70 -> escape_ical(B, <<Acc/binary, 13, 10, 32>>, 0);
      escape_ical(<<13, 10, Rest/binary>>, Acc, N) -> escape_ical(Rest, <<Acc/binary, $\\, $n>>, N+2);
      escape_ical(<<10, Rest/binary>>, Acc, N) -> escape_ical(Rest, <<Acc/binary, $\\, $n>>, N+2);
      escape_ical(<<9, Rest/binary>>, Acc, N) -> escape_ical(Rest, <<Acc/binary, 32>>, N+1);
      escape_ical(<<$", Rest/binary>>, Acc, N) -> escape_ical(Rest, <<Acc/binary, $\\, $">>, N+2);
      escape_ical(<<$,, Rest/binary>>, Acc, N) -> escape_ical(Rest, <<Acc/binary, $\\, $,>>, N+2);
      escape_ical(<<$:, Rest/binary>>, Acc, N) -> escape_ical(Rest, <<Acc/binary, $", $:, $">>, N+3);
      escape_ical(<<$;, Rest/binary>>, Acc, N) -> escape_ical(Rest, <<Acc/binary, $\\, $;>>, N+2);
      escape_ical(<<$\\, Rest/binary>>, Acc, N) -> escape_ical(Rest, <<Acc/binary, $\\, $\\>>, N+2);
      escape_ical(<<C, Rest/binary>>, Acc, N) -> escape_ical(Rest, <<Acc/binary, C>>, N+1).
  
  %% @doc Return true if Start is a prefix of Word
  %% @spec starts_with(String, String) -> bool()
  