/
MadDAD
/
alterplast
Обзор
Документация
Войти
/
MadDAD
/
alterplast
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
1cpp/Source/StringArrayEx.cpp
56 строк
1 KB
trdm
+
24 мар 2017, 11:36
24 мар 2017, 11:36
f368595
Код
Авторство
О чём код?
// StringArrayEx.cpp: implementation of the CStringArrayEx class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "addin.h" #include "StringArrayEx.h" #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// IMPLEMENT_SERIAL(CStringArrayEx, CStringArray, VERSIONABLE_SCHEMA | 1) CStringArrayEx::CStringArrayEx() { } CStringArrayEx::~CStringArrayEx() { } void CStringArrayEx::FillSeparateString(char const* str, const char *sep, bool bErase) { char *token = NULL; char *dest = (char*)malloc(strlen(str)+1); if( dest ) { strcpy(dest, str); token = strtok(dest, sep); while( token != NULL ) { CString s(token); s.TrimRight(); s.TrimLeft(); Add(s); token = strtok(NULL, sep); } free(dest); } } void CStringArrayEx::FillSeparateString(CString &str, const char *sep, bool bErase) { FillSeparateString((LPCSTR)str, sep, bErase); }