本文整理汇总了C++中Stroka::append方法的典型用法代码示例。如果您正苦于以下问题:C++ Stroka::append方法的具体用法?C++ Stroka::append怎么用?C++ Stroka::append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stroka
的用法示例。
在下文中一共展示了Stroka::append方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DebugString
Stroka TFileCollection::DebugString() const {
Stroka ret;
for (size_t i = 0; i < Files.size(); ++i) {
ret.append(Files[i]->Name()).append(" ->");
for (size_t j = 0; j < Files[i]->Aliases().size(); ++j)
ret.append(' ').append(Files[i]->Aliases()[j]);
ret.append('\n');
}
return ret;
}
示例2: StripFileComponent
Stroka StripFileComponent(const Stroka& fileName)
{
Stroka dir = IsDir(fileName) ? fileName : GetDirName(fileName);
if (!dir.empty() && dir.back() != GetDirectorySeparator()) {
dir.append(GetDirectorySeparator());
}
return dir;
}
示例3: SlashFolderLocal
void SlashFolderLocal(Stroka &folder)
{
if (!folder)
return;
#ifdef _win32_
size_t pos;
while ((pos = folder.find('/')) != Stroka::npos)
folder.replace(pos, 1, LOCSLASH_S);
#endif
if (folder[+folder-1] != LOCSLASH_C)
folder.append(LOCSLASH_S);
}
示例4: yexception
inline Stroka Load<Stroka>(TInputStream* in) {
size_t len = Load<ui32>(in);
Stroka ret;
TTempBuf tmp;
while (len) {
const size_t toread = Min(len, tmp.Size());
const size_t readed = in->Read(tmp.Data(), toread);
if (!readed) {
ythrow yexception() << "malformed archive";
}
ret.append(tmp.Data(), readed);
len -= readed;
}
return ret;
}
示例5: EncodeXMLString
Stroka EncodeXMLString(const char* str) {
Stroka strout;
if (!str)
return Stroka();
char num[15];
num[14] = 0;
num[13] = ';';
for (const char* s = str, *s1; *s;) {
for (s1 = s; safe_chars[(unsigned char)(*s1)]; s1++)
;
if (s1 != s)
strout.replace(+strout, 0, s, 0, s1 - s, s1 - s);
s = s1;
if (*s == 0)
break;
strout.replace(+strout, 0, "&#", 0, 2, 2);
char *p = &num[13];
for (int code = csYandex.unicode[(unsigned char)(*s++)]; code > 0; code /= 10)
*(--p) = '0' + (code % 10);
strout.append(p);
}
return strout;
}