CString | std::string | string.h | TCHAR.H | ||||
CString(ch,repeat) | string(repeat,ch) | ||||||
GetLength() | length() , size() | strlen | _tcslen | ||||
IsEmpty() | empty() | ||||||
Empty() | erase() , clear() | ||||||
Left(count) | substr(0,count) | ||||||
Mid(first,count) | substr(first,count) | ||||||
Right(count) | substr(length()-count) | ||||||
Find(str,start) | find(str,start) | ||||||
FindOneOf(charSet) | find_first_of(charSet) | strcspn | _tcscspn | ||||
GetBuffer() | c_str() , data() , &s[0] | ||||||
GetBuffer(newSize) | resize(newSize) | ||||||
ReleaseBuffer(-1) | s = string (s.c_str()) | ||||||
GetAt(0) | front() | C++11 | |||||
GetAt(GetLength()-1) | back() | C++11 | |||||
CString | ⇒ | tstring | cstr = tstr.c_str() ; | |
tstring | ⇒ | CString | tstr = LPCTSTR(cstr) ; | |