Changeset 4100


Ignore:
Timestamp:
09/28/03 15:58:48 (19 years ago)
Author:
piso
Message:

toLowerCase()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/Utilities.java

    r4099 r4100  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: Utilities.java,v 1.2 2003-09-28 15:45:23 piso Exp $
     5 * $Id: Utilities.java,v 1.3 2003-09-28 15:58:48 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    7272            UPPER_CASE_CHARS[i] = Character.toUpperCase((char)i);
    7373    }
     74
     75    public static final char toLowerCase(char c)
     76    {
     77        if (c < 128)
     78            return LOWER_CASE_CHARS[c];
     79        return Character.toLowerCase(c);
     80    }
     81
     82    private static final char[] LOWER_CASE_CHARS = new char[128];
     83
     84    static {
     85        for (int i = LOWER_CASE_CHARS.length; i-- > 0;)
     86            LOWER_CASE_CHARS[i] = Character.toLowerCase((char)i);
     87    }
    7488}
Note: See TracChangeset for help on using the changeset viewer.