本文整理汇总了C++中plString::CharAt方法的典型用法代码示例。如果您正苦于以下问题:C++ plString::CharAt方法的具体用法?C++ plString::CharAt怎么用?C++ plString::CharAt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类plString
的用法示例。
在下文中一共展示了plString::CharAt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: hsAssert
std::vector<plFileName> plStreamSource::GetListOfNames(const plFileName& dir, const plString& ext)
{
plFileName sDir = dir.Normalize('/');
hsAssert(ext.CharAt(0) != '.', "Don't add a dot");
std::lock_guard<std::mutex> lock(fMutex);
// loop through all the file data records, and create the list
std::vector<plFileName> retVal;
for (auto curData = fFileData.begin(); curData != fFileData.end(); curData++)
{
if ((curData->second.fDir.AsString().CompareI(sDir.AsString()) == 0) &&
(curData->second.fExt.CompareI(ext) == 0))
retVal.push_back(curData->second.fFilename);
}
#ifndef PLASMA_EXTERNAL_RELEASE
// in internal releases, we can use on-disk files if they exist
// Build the search string as "dir/*.ext"
std::vector<plFileName> files = plFileSystem::ListDir(sDir, ("*." + ext).c_str());
for (auto iter = files.begin(); iter != files.end(); ++iter)
{
plFileName norm = iter->Normalize('/');
if (fFileData.find(norm) == fFileData.end()) // we haven't added it yet
retVal.push_back(norm);
}
#endif // PLASMA_EXTERNAL_RELEASE
return retVal;
}