code: public static String asciiToLowerCase(String s)
      {
          char[] c = null;
          int i=s.length();
  
          // look for first conversion
          while (i-->0)
          {
              char c1=s.charAt(i);
              if (c1<=127)
              {
                  char c2=lowercases[c1];
                  if (c1!=c2)
                  {
                      c=s.toCharArray();
                      c[i]=c2;
                      break;
                  }
              }
          }
  
          while (i-->0)
          {
              if(c[i]<=127)
                  c[i] = lowercases[c[i]];
          }
          
          return c==null?s:new String(c);
      }
docs: fast lower case conversion. Only works on ascii (not unicode)
  @param s the string to convert
  @return a lower case version of s