You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by fd...@apache.org on 2010/07/11 12:50:34 UTC

svn commit: r963045 - /couchdb/trunk/src/couchdb/couch_util.erl

Author: fdmanana
Date: Sun Jul 11 10:50:34 2010
New Revision: 963045

URL: http://svn.apache.org/viewvc?rev=963045&view=rev
Log:
Removing unused function couch_util:ascii_lower/1. If ever needed, the exact same
functionality is provided by string:to_lower/1 (ASCII based, not Unicode nor charset based).


Modified:
    couchdb/trunk/src/couchdb/couch_util.erl

Modified: couchdb/trunk/src/couchdb/couch_util.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_util.erl?rev=963045&r1=963044&r2=963045&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_util.erl (original)
+++ couchdb/trunk/src/couchdb/couch_util.erl Sun Jul 11 10:50:34 2010
@@ -15,7 +15,7 @@
 -export([priv_dir/0, start_driver/1, normpath/1]).
 -export([should_flush/0, should_flush/1, to_existing_atom/1]).
 -export([rand32/0, implode/2, collate/2, collate/3]).
--export([abs_pathname/1,abs_pathname/2, trim/1, ascii_lower/1]).
+-export([abs_pathname/1,abs_pathname/2, trim/1]).
 -export([encodeBase64Url/1, decodeBase64Url/1]).
 -export([to_hex/1, parse_term/1, dict_find/3]).
 -export([get_nested_json_value/2, json_user_ctx/1]).
@@ -196,18 +196,6 @@ separate_cmd_args(" " ++ Rest, CmdAcc) -
 separate_cmd_args([Char|Rest], CmdAcc) ->
     separate_cmd_args(Rest, [Char | CmdAcc]).
 
-% lowercases string bytes that are the ascii characters A-Z.
-% All other characters/bytes are ignored.
-ascii_lower(String) ->
-    ascii_lower(String, []).
-
-ascii_lower([], Acc) ->
-    lists:reverse(Acc);
-ascii_lower([Char | RestString], Acc) when Char >= $A, Char =< $B ->
-    ascii_lower(RestString, [Char + ($a-$A) | Acc]);
-ascii_lower([Char | RestString], Acc) ->
-    ascii_lower(RestString, [Char | Acc]).
-
 % Is a character whitespace?
 is_whitespace($\s) -> true;
 is_whitespace($\t) -> true;