leetcode 709. To Lower Case(水,大寫轉小寫)
Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase.
Example 1:
Input: “Hello” Output: “hello” Example 2:
Input: “here” Output: “here” Example 3:
Input: “LOVELY” Output: “lovely”
題意:大寫轉小寫
知識點:
toLowerCase()
大寫轉小寫toUpperCase()
小寫轉大寫
class Solution {
public String toLowerCase(String str) {
return str.toLowerCase();
}
}
相關推薦
leetcode 709. To Lower Case(水,大寫轉小寫)
Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowe
[LeetCode]709. To Lower Case
out parameter imp () inpu love ++ strong UNC Implement function ToLowerCase() that has a string parameter str, and returns the same strin
[LeetCode] 709. To Lower Case(C++)
Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase. Example 1: Input: "Hello" Out
LeetCode 709 To Lower Case 解題報告
題目要求 Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase. 題目分析及思路 題目要求返回一個字串的小寫形式。可以直接使用lower()函式
Leetcode——709. To Lower Case
題目原址 題目描述 Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase. Exampl
LeetCode 709 To Lower Case 轉換成小寫字母
class Solution { public: string toLowerCase(string str) { for(auto &c:str) { if(c>='A' && c
LeetCode 709.To Lower Case
字母 put NPU 轉化 沒有 運行 des image 分享 Description Implement function ToLowerCase() that has a string parameter str, and returns the same strin
【Leetcode】709. To Lower Case
clas esc scrip int builder cte func pre 遍歷 To Lower Case Description Implement function ToLowerCase() that has a string parameter str, an
【LeetCode】709. To Lower Case題解(C++)
【LeetCode】709. To Lower Case(C++) 709. To Lower Case Describe: Implement function ToLowerCase() that has a string parameter str, a
【Leetcode】To Lower Case
題目大意:把所有的大寫字母轉化為小寫字母 解題方法:判斷字元是否在‘A’-‘Z’中,如果是,則轉換為小寫,如果不是,保留不變既可 Python解法: class Solution(object): def toLowerCase(self, str):
leetcode ( To Lower Case)
Title: To Lower Case 709 Difficulty:Easy 原題leetcode地址: https://leetcode.com/problems/to-lower-case/ 1. 大寫字元加3
709 to lower case 及字串方法總結
/** * @param {string} str * @return {string} */ var toLowerCase = function(str) { var result = ''; for(var i =0; i<
709. To Lower Case
uri 小寫 urn 得到 The public input amp 差值 Algorithm to-lower-case https://leetcode.com/problems/to-lower-case/ 1)problem Implement function T
小寫轉大寫,大寫轉小寫
public class MainClass { public static void main(String []args){ /**將所有的字串轉換成大寫或小寫字母並打印出來*/ String str = new Strin
#迴圈輸入10個字元,大寫轉小寫,小寫轉大寫,其它字元不變,然後輸出
c=str(input('請輸入10個字元:')) for i in c: if i.isupper(): print(i.lower(),end='') elif i.islower(): print(i.upper(),end='') el
C#LeetCode刷題之#709-轉換成小寫字母(To Lower Case)
問題 實現函式 ToLowerCase(),該函式接收一個字串引數 str,並將該字串中的大寫字母轉換成小寫字母,之後返回新的字串。 輸入: "Hello" 輸出: "hello" 輸入: "here" 輸出: "here" 輸入:
【LeetCode】709(Java)To Lower Case
Question: Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase. 實現函式ToLowerCase st
leetcode 709. 轉換成小寫字母(To Lower Case)
string return class lis 函數 目錄 res lower 大寫 目錄 題目描述: 示例 1: 示例 2: 示例 3: 解法:
[LeetCode] To Lower Case 轉為小寫
Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase. Example 1: Input: "Hello"
Leetcode709.To Lower Case轉換成小寫字母
實現函式 ToLowerCase(),該函式接收一個字串引數 str,並將該字串中的大寫字母轉換成小寫字母,之後返回新的字串。 示例 1: 輸入: "Hello" 輸出: "hello" 示例 2: 輸入: "here" 輸出: "here" 示例