Trim
·
개발/연구
#ifdef _UNICODE #define Trim TrimW #else #define Trim TrimA #endif DWORD TrimW(wchar_t* pszTarget) { BOOL bFirstCheck = FALSE; BOOL bContSpace = FALSE; wchar_t* PtrRef = pszTarget; wchar_t* PtrMrk = pszTarget; if ( pszTarget == NULL ) return ERROR_INVALID_PARAMETER; while( *PtrRef ) { if ( !bFirstCheck ) { if ( (*PtrRef) == _T(' ') ) { PtrRef++; continue; } else { *PtrMrk = *PtrRef; bFirstCheck ..