Changeset 4099


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

toUpperCase()

File:
1 edited

Legend:

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

    r582 r4099  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: Utilities.java,v 1.1 2003-01-25 16:46:31 piso Exp $
     5 * $Id: Utilities.java,v 1.2 2003-09-28 15:45:23 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5858        return false;
    5959    }
     60
     61    public static final char toUpperCase(char c)
     62    {
     63        if (c < 128)
     64            return UPPER_CASE_CHARS[c];
     65        return Character.toUpperCase(c);
     66    }
     67
     68    private static final char[] UPPER_CASE_CHARS = new char[128];
     69
     70    static {
     71        for (int i = UPPER_CASE_CHARS.length; i-- > 0;)
     72            UPPER_CASE_CHARS[i] = Character.toUpperCase((char)i);
     73    }
    6074}
Note: See TracChangeset for help on using the changeset viewer.