本文整理汇总了C++中OovString::erase方法的典型用法代码示例。如果您正苦于以下问题:C++ OovString::erase方法的具体用法?C++ OovString::erase怎么用?C++ OovString::erase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OovString
的用法示例。
在下文中一共展示了OovString::erase方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getOverloadFuncName
OovString ModelStatement::getOverloadFuncName() const
{
OovString opName = getName();
size_t pos = getRightSidePosFromMemberRefExpr(opName, true);
if(pos != 0)
opName.erase(0, pos);
return opName;
}
示例2: getComponentParentName
std::string ComponentTypesFile::getComponentParentName(std::string const &compName)
{
OovString parent = compName;
size_t pos = parent.rfind('/');
if(pos != OovString::npos)
{
parent.erase(pos);
}
return parent;
}
示例3: getComponentChildName
std::string ComponentTypesFile::getComponentChildName(std::string const &compName)
{
OovString child = compName;
size_t pos = child.rfind('/');
if(pos != OovString::npos)
{
child.erase(0, pos+1);
}
return child;
}
示例4: makeTreeOutBaseFileName
OovString Project::makeTreeOutBaseFileName(OovStringRef const srcFileName,
OovStringRef const srcRootDir, OovStringRef const outFilePath)
{
OovString file = getSrcRootDirRelativeSrcFileName(srcFileName, srcRootDir);
if(file[0] == '/')
file.erase(0, 1);
FilePath tmpOutFileName(outFilePath, FP_Dir);
tmpOutFileName.appendFile(file);
tmpOutFileName.discardExtension();
return tmpOutFileName;
}
示例5: getSrcRootDirRelativeSrcFileName
OovString Project::getSrcRootDirRelativeSrcFileName(OovStringRef const srcFileName,
OovStringRef const srcRootDir)
{
OovString relSrcFileName = srcFileName;
size_t pos = relSrcFileName.find(srcRootDir.getStr());
if(pos != std::string::npos)
{
relSrcFileName.erase(pos, srcRootDir.numBytes());
FilePathRemovePathSep(relSrcFileName, 0);
}
return relSrcFileName;
}
示例6: getAttrName
OovString ModelStatement::getAttrName() const
{
OovString attrName = getName();
if(mStatementType == ST_Call)
{
size_t pos = getRightSidePosFromMemberRefExpr(attrName, false);
if(pos != 0)
attrName.erase(pos);
else
attrName.clear();
}
return attrName;
}
示例7: 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;
}
示例8: 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;
}
示例9:
extern "C" G_MODULE_EXPORT gboolean on_StackTextview_button_press_event(GtkWidget *widget,
GdkEvent *event, gpointer user_data)
{
GdkEventButton *buttEvent = reinterpret_cast<GdkEventButton *>(event);
if(buttEvent->type == GDK_2BUTTON_PRESS)
{
GtkTextView *widget = GTK_TEXT_VIEW(ControlWindow::getTabView(
ControlWindow::CT_Stack));
OovString line = Gui::getCurrentLineText(GTK_TEXT_VIEW(widget));
gEditor->debugSetStackFrame(line);
size_t pos = line.rfind(' ');
if(pos != std::string::npos)
{
pos++;
line.erase(0, pos);
}
gEditor->gotoFileLine(line);
}
return false;
}
示例10: coerceParentComponents
void ComponentTypesFile::coerceParentComponents(OovStringRef const compName)
{
OovString name = compName;
while(1)
{
size_t pos = name.rfind('/');
if(pos != std::string::npos)
{
name.erase(pos);
}
if(compName != name.getStr())
{
setComponentType(name, CT_Unknown);
}
if(pos == std::string::npos)
{
break;
}
}
}