本文整理汇总了C++中OovString::replaceStrs方法的典型用法代码示例。如果您正苦于以下问题:C++ OovString::replaceStrs方法的具体用法?C++ OovString::replaceStrs怎么用?C++ OovString::replaceStrs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OovString
的用法示例。
在下文中一共展示了OovString::replaceStrs方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setFileDefine
static void setFileDefine(OovStringRef const fn, OovStringRef const srcRootDir)
{
OovString relFn = Project::getSrcRootDirRelativeSrcFileName(fn, srcRootDir);
OovString fileDef = "COV_";
fileDef += relFn;
fileDef.replaceStrs("//", "_");
fileDef.replaceStrs("/", "_");
fileDef.replaceStrs(".", "_");
fileDef.replaceStrs(":", "");
sFileDefine = fileDef;
}
示例2: makeOutBaseFileName
OovString Project::makeOutBaseFileName(OovStringRef const srcFileName,
OovStringRef const srcRootDir, OovStringRef const outFilePath)
{
OovString file = getSrcRootDirRelativeSrcFileName(srcFileName, srcRootDir);
if(file[0] == '/')
file.erase(0, 1);
file.replaceStrs("_", "_u");
file.replaceStrs("/", "_s");
file.replaceStrs(".", "_d");
FilePath outFileName(outFilePath, FP_Dir);
outFileName.appendFile(file);
return outFileName;
}
示例3: makeOverloadKeyFromOperUSR
OovString ModelStatement::makeOverloadKeyFromOperUSR(OovStringRef operStr)
{
OovString sym;
#define DEBUG_KEY 0
#if(DEBUG_KEY)
sym = operStr;
// Remove symbols that conflict with either the CompoundValue class or
// ModelStatement name separator characters.
sym.replaceStrs("@", "-");
sym.replaceStrs("#", "-");
sym.replaceStrs(":", "-");
sym.appendInt(makeHash(operStr), 16);
#else
sym.appendInt(makeHash(operStr), 16);
#endif
return sym;
}
示例4: makeOrigCovFn
/// Use the filename to make an identifier.
static std::string makeOrigCovFn(OovStringRef const fn)
{
OovString covFn = fn;
if(covFn.find("COV_") != std::string::npos)
{
covFn.erase(0, 4);
}
covFn.replaceStrs("_", "/");
size_t pos = covFn.rfind('/');
if(pos != std::string::npos)
{
covFn.replace(pos, 1, ".");
}
return covFn;
}
示例5: FilePathGetAsWindowsPath
OovString FilePathGetAsWindowsPath(OovStringRef const path)
{
OovString windowsPath = path;
windowsPath.replaceStrs("/", "\\");
return windowsPath;
}