-module(utString).

%% API
-export([
	toLowerStr/1,
	toUpperStr/1
]).

toLowerStr(List) when is_list(List) ->
	[begin
		 case C >= $A andalso C =< $Z of
			 true ->
				 C - $A + $a;
			 _ ->
				 C
		 end
	 end || C <- List];
toLowerStr(Bin) when is_binary(Bin) ->
	toLowerStr(utTypeCast:toList(Bin)).

toUpperStr(List) when is_list(List) ->
	[begin
		 case C >= $a andalso C =< $z of
			 true ->
				 C - $a + $A;
			 _ ->
				 C
		 end
	 end || C <- List];
toUpperStr(Bin) when is_binary(Bin) ->
	toUpperStr(utTypeCast:toList(Bin)).
