string的大小寫轉換

以前也作了一些大小寫轉換的題,但沒好好總結,如今小小說明下~ 主要是C++頭文件algorithm下的transform調用(algorithm真是個小寶庫~)ios transform(str.begin(),str.end(),str.begin(),::toupper); 三個參數分別爲:字符串起始、字符串結束、字符串返回值存儲的位置、大小寫web 代碼以下:svg #include <st
相關文章
相關標籤/搜索