本文整理汇总了C++中StringList::Str方法的典型用法代码示例。如果您正苦于以下问题:C++ StringList::Str方法的具体用法?C++ StringList::Str怎么用?C++ StringList::Str使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringList
的用法示例。
在下文中一共展示了StringList::Str方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FillFormat
void FillFormat(const char *TypeName)
{
GetIniString(TypeName, "Start", "", StartText, sizeof(StartText));
GetIniString(TypeName, "End", "", EndText, sizeof(EndText));
int FormatNumber = 0;
delete Format;
Format = new StringList;
for(StringList * CurFormat = Format;; CurFormat = CurFormat->Add())
{
char FormatName[100];
SPrintf(FormatName, "Format%d", FormatNumber++);
GetIniString(TypeName, FormatName, "", CurFormat->Str(), PROF_STR_LEN);
if(*CurFormat->Str() == 0)
break;
}
int Number = 0;
delete IgnoreStrings;
IgnoreStrings = new StringList;
for(StringList * CurIgnoreString = IgnoreStrings;; CurIgnoreString = CurIgnoreString->Add())
{
char Name[100];
SPrintf(Name, "IgnoreString%d", Number++);
GetIniString(TypeName, Name, "", CurIgnoreString->Str(), PROF_STR_LEN);
if(*CurIgnoreString->Str() == 0)
break;
}
}
示例2: if
int WINAPI _export GetArcItem(struct PluginPanelItem *Item, struct ArcItemInfo *Info)
{
char Str[512];
StringList *CurFormatNode = Format;
SYSTEMTIME stModification, stCreation, stAccess, syst;
memset(&stModification, 0, sizeof(stModification));
memset(&stCreation, 0, sizeof(stCreation));
memset(&stAccess, 0, sizeof(stAccess));
GetSystemTime(&syst);
while(GetString(Str, sizeof(Str)))
{
RegExp re;
if(*StartText)
{
if(re.compile(StartText))
{
if(re.match(Str))
*StartText = 0;
}
else
{
if((*StartText == '^' && strncmp(Str, StartText + 1, lstrlen(StartText + 1)) == 0) ||
(*StartText != '^' && strstr(Str, StartText) != NULL))
{
*StartText = 0;
}
}
continue;
}
if(*EndText)
{
if(re.compile(EndText))
{
if(re.match(Str))
break;
}
else if(*EndText == '^')
{
if(strncmp(Str, EndText + 1, lstrlen(EndText + 1)) == 0)
break;
}
else if(strstr(Str, EndText) != NULL)
break;
}
bool bFoundIgnoreString = false;
for(StringList * CurIgnoreString = IgnoreStrings; CurIgnoreString->Next(); CurIgnoreString = CurIgnoreString->Next())
{
if(re.compile(CurIgnoreString->Str()))
{
if(re.match(Str))
bFoundIgnoreString = true;
}
else if(*CurIgnoreString->Str() == '^')
{
if(strncmp(Str, CurIgnoreString->Str() + 1, lstrlen(CurIgnoreString->Str() + 1)) == 0)
bFoundIgnoreString = true;
}
else if(strstr(Str, CurIgnoreString->Str()) != NULL)
bFoundIgnoreString = true;
}
if(bFoundIgnoreString)
continue;
if(re.compile(CurFormatNode->Str()))
{
if(Match match = re.match(Str))
ParseListingItemRegExp(match, Item, Info, stModification, stCreation, stAccess);
}
else
ParseListingItemPlain(CurFormatNode->Str(), Str, Item, Info, stModification, stCreation, stAccess);
CurFormatNode = CurFormatNode->Next();
if(!CurFormatNode || !CurFormatNode->Next())
{
MakeFiletime(stModification, syst, &Item->FindData.ftLastWriteTime);
MakeFiletime(stCreation, syst, &Item->FindData.ftCreationTime);
MakeFiletime(stAccess, syst, &Item->FindData.ftLastAccessTime);
for(int I = lstrlen(Item->FindData.cFileName) - 1; I >= 0; I--)
{
int Ch = Item->FindData.cFileName[I];
if(Ch == ' ' || Ch == '\t')
Item->FindData.cFileName[I] = 0;
else
break;
}
return (GETARC_SUCCESS);
}
}
return (GETARC_EOF);
}