709. To Lower Casejava
題目大意:字符串大寫轉小寫數組
思路:函數
Java實現:code
public String toLowerCase(String str) { char[] arr = str.toCharArray(); for (int i = 0; i < arr.length; i++) { if (arr[i] >= 'A' && arr[i] <= 'Z') { arr[i] += 32; } } return String.valueOf(arr); }