[C++] 생성한 문자열 공백없애는 함수 만들기
*문자열 string #include #include using namespace std; string GetStringRemoveSpace(string targetText, string target) { string result; while (targetText.find(target) != string::npos) { result += targetText.substr(0, targetText.find(target)); targetText = targetText.substr(targetText.find(target) + target.length()); } result += targetText; return result; } void main() { string targetText = "Hello Hell..
2022.06.14