本文整理汇总了C++中festring::Empty方法的典型用法代码示例。如果您正苦于以下问题:C++ festring::Empty方法的具体用法?C++ festring::Empty怎么用?C++ festring::Empty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类festring
的用法示例。
在下文中一共展示了festring::Empty方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetName
festring material::GetName(truth Articled, truth Adjective) const
{
static festring Name;
Name.Empty();
AddName(Name, Articled, Adjective);
return Name;
}
示例2: GetName
festring id::GetName(int Case, int Amount) const
{
static festring Name;
Name.Empty();
AddName(Name, Case, Amount);
return Name;
}
示例3: ExtractWord
void festring::ExtractWord(festring& To)
{
for(sizetype c = 0; c < Size; ++c)
if(Data[c] == ' ')
{
To.Empty();
To.Append(&Data[c + 1], Size - c - 1);
Erase(c, Size - c);
SwapData(To);
return;
}
To = *this;
Empty();
}
示例4: Reply
void febot::Reply(festring& String) const
{
String.Empty();
if(GetControlWordChain()->Link.empty())
return;
wordchain* WordChain = GetControlWordChain()->GetRandomLink();
String << WordChain->String.back();
for(WordChain = WordChain->GetRandomLink(); !WordChain->String.back().IsEmpty(); WordChain = WordChain->GetRandomLink())
String << ' ' << WordChain->String.back();
String.PostProcessForFebot();
}
示例5: ReadWord
void inputfile::ReadWord(festring& String, truth AbortOnEOF)
{
int Mode = 0;
String.Empty();
for(int Char = fgetc(Buffer); !feof(Buffer); Char = fgetc(Buffer))
{
if(isalpha(Char) || Char == '_')
{
if(!Mode)
Mode = MODE_WORD;
else if(Mode == MODE_NUMBER)
{
ungetc(Char, Buffer);
return;
}
String << char(Char);
continue;
}
if(isdigit(Char))
{
if(!Mode)
Mode = MODE_NUMBER;
else if(Mode == MODE_WORD)
{
ungetc(Char, Buffer);
return;
}
String << char(Char);
continue;
}
if((Char == ' ' || Char == '\n') && Mode)
return;
if(ispunct(Char) && HandlePunct(String, Char, Mode) == PUNCT_RETURN)
return;
}
if(AbortOnEOF)
ABORT("Unexpected end of file %s!", FileName.CStr());
if(Mode)
clearerr(Buffer);
}
示例6: SplitString
void festring::SplitString(festring& Source,
festring& Result,
sizetype Length)
{
if(Source.GetSize() <= Length)
{
Result << Source;
Source.Empty();
return;
}
sizetype Pos = Source.FindLast(' ', Length);
if(Pos != NPos)
{
Result.Append(Source, Pos);
Source.Erase(0, Pos + 1);
}
else
{
Result.Append(Source, Length);
Source.Erase(0, Length);
}
}