LeetCode 709. To Lower Case

题目链接:https://leetcode.com/problems/to-lower-case/description/

题目解析:没什么特别的,善用STL。

代码如下:0ms Accepted

class Solution {
public:
    string toLowerCase(string str) {
        transform(str.begin(), str.end(), str.begin(), ::tolower);
        return str;
    }
};

猜你喜欢

转载自blog.csdn.net/github_36324732/article/details/81193016
今日推荐