anchor.diff:  %% interface functions
   -export([
       trim/1,
  +	trim_left/1,
  +	trim_right/1,
       is_string/1,
       line/1,
       to_rootname/1,
  
positive.code: 		{Rest,[$;|Acc]};
  	get_entity([C|Rest], Acc) ->
  		get_entity(Rest, [C|Acc]).
  	
  
negative.code:     to_upper/1,
      replace/3,
  	truncate/2,
  	truncate/3,
  	split_lines/1
  ]).
  
  -include_lib("include/zotonic.hrl").
  
  
  %% @doc Remove whitespace at the start and end of the string
  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 whitespace at the start the string
  trim_left(<<C, Rest/binary>> = Bin) ->
  	case C of
  		W when W=:=10; W=:=13; W=:=9; W=:=32 -> trim(Rest);
  		_ -> Bin
  	end;
  trim_left(<<>>) ->
  	<<>>;
  trim_left(L) ->
  	binary_to_list(trim_left(iolist_to_binary(L))).
  	
  %% @doc Remove whitespace at the end of the string
  trim_right(B) when is_binary(B) ->
  	trim_right(B, <<>>, <<>>);
  trim_right(L) ->
  	binary_to_list(trim_right(iolist_to_binary(L))).
  
  	trim_right(<<C, Rest/binary>>, WS, Acc) ->
  		case C of
  			W when W=:=10; W=:=13; W=:=9; W=:=32 -> trim_right(Rest, <<WS/binary, C>>, Acc);
  			_ -> trim_right(Rest, <<>>, <<Acc/binary, WS/binary, C>>)
  		end;
  	trim_right(<<>>, _WS, Acc) ->
  		Acc.
  
  
  %% @doc Check if the variable is a one dimensional list, probably a string
  