Here you can find the source of toLowerCase(String s)
public static String toLowerCase(String s)
//package com.java2s; //it under the terms of the GNU Affero General Public License as published by public class Main { /**//w w w .j a v a 2 s .com * Locale-independent variant of {@link String#toLowerCase()}. * This method works on {@code char} level and hence uses a locale-independent * character mapping as defined by the Unicode standard. */ public static String toLowerCase(String s) { StringBuilder sb = new StringBuilder(s); for (int i = 0, len = sb.length(); i < len; i++) { char ch = sb.charAt(i); char ch2 = Character.toLowerCase(ch); if (ch != ch2) sb.setCharAt(i, ch2); } return sb.toString(); } }