C++ Tricks(一)—— 判断字符串 string 对象的所有字符都相等

S == string(S.size(), S[0]);
原文地址:https://www.cnblogs.com/mtcnn/p/9423849.html