本文整理汇总了C++中TStrings::Delete方法的典型用法代码示例。如果您正苦于以下问题:C++ TStrings::Delete方法的具体用法?C++ TStrings::Delete怎么用?C++ TStrings::Delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TStrings
的用法示例。
在下文中一共展示了TStrings::Delete方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: str_getlist_local
str_list* _std str_copylines(str_list*list, u32t first, u32t last) {
TStrings lst;
if (first<=last) {
str_getstrs(list,lst);
if (lst.Count())
if (first>=lst.Count()) lst.Clear(); else {
if (last>=lst.Count()) last=lst.Max();
if (++last!=lst.Count()) lst.Delete(last,lst.Count()-last);
if (first) lst.Delete(0,first);
}
}
return str_getlist_local(lst.Str);
}
示例2: get_keylist
str_list* get_keylist(TINIFile *ini, const char *Section, str_list**values) {
TStrings lst;
ini->ReadSectionKeys(Section,lst);
if (!values) {
lst.TrimEmptyLines();
} else {
TStrings vlst;
ini->ReadSectionValues(Section,vlst);
int ii;
while (ii<=lst.Max()) {
spstr sk(lst[ii]), sv(vlst[ii]);
if (!sk.trim().length() && !sv.trim().length())
{ lst.Delete(ii); vlst.Delete(ii); } else ii++;
}
*values = str_getlist_local(vlst.Str);
}
return str_getlist_local(lst.Str);
}
示例3: TForm
//---------------------------------------------------------------------------
__fastcall TLicenseDialog::TLicenseDialog(TComponent * Owner, TLicense License)
: TForm(Owner)
{
UseSystemSettings(this);
TStrings * LicenseList = new TStringList();
try
{
LicenseList->Text = ReadResource(LicenseStr[License]);
assert(LicenseList->Count > 0);
Caption = FMTLOAD(LICENSE_CAPTION, (LicenseList->Strings[0]));
LicenseList->Delete(0);
LicenseMemo->Lines->Text = LicenseList->Text;
}
__finally
{
delete LicenseList;
}
}
示例4: init_msg_ini
static void init_msg_ini(void) {
if (!msg) {
TStrings ht;
spstr secname("help");
msg = new_ini(msg_name());
msg->ReadSection(secname, ht);
/* merge strings, ended by backslash. ugly, but allows more friendly
editing of msg.ini */
l ii=0, lp;
while (ii<ht.Count()) {
if (ht[ii].trim().lastchar()=='\\') {
ht[ii].dellast()+=ht.MergeBackSlash(ii+1,&lp);
ht.Delete(ii+1, lp-ii-1);
}
ii++;
}
msg->WriteSection(secname, ht, true);
}
}