TreeviewCopyright © aleen42 all right reserved, powered by aleen42

709. 转换成小写字母

https://leetcode-cn.com/problems/to-lower-case/

Java

/*
 * @Author: Goog Tech
 * @Date: 2020-07-20 23:50:00
 * @Description: https://leetcode-cn.com/problems/to-lower-case/
 * @FilePath: \leetcode-googtech\#709. To Lower Case\Solution.java
 */

class Solution {
    public String toLowerCase(String str) {
        String result = "";
        for (int i = 0; i < str.length(); i++) {
            char temp = str.charAt(i);
            if (temp >= 65 && temp <= 90) {
                temp += 32;
            }
            result += temp;
        }
        return result;
    }
}

Python

# updating
Copyright © GoogTech 2021 all right reserved,powered by GitbookLast update time : 2021-09-15 01:55:05

results matching ""

    No results matching ""