当前位置: 首页>>代码示例>>C++>>正文


C++ OovString::erase方法代码示例

本文整理汇总了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;
    }
开发者ID:animatedb,项目名称:oovaide,代码行数:9,代码来源:ModelObjects.cpp

示例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;
    }
开发者ID:Purplenigma,项目名称:oovaide,代码行数:10,代码来源:Components.cpp

示例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;
    }
开发者ID:Purplenigma,项目名称:oovaide,代码行数:10,代码来源:Components.cpp

示例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;
    }
开发者ID:animatedb,项目名称:oovaide,代码行数:12,代码来源:Project.cpp

示例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;
    }
开发者ID:animatedb,项目名称:oovaide,代码行数:12,代码来源:Project.cpp

示例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;
    }
开发者ID:animatedb,项目名称:oovaide,代码行数:13,代码来源:ModelObjects.cpp

示例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;
    }
开发者ID:animatedb,项目名称:oovaide,代码行数:13,代码来源:Project.cpp

示例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;
    }
开发者ID:Purplenigma,项目名称:oovaide,代码行数:16,代码来源:Coverage.cpp

示例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;
    }
开发者ID:animatedb,项目名称:oovaide,代码行数:20,代码来源:oovEdit.cpp

示例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;
            }
        }
    }
开发者ID:Purplenigma,项目名称:oovaide,代码行数:20,代码来源:Components.cpp


注:本文中的OovString::erase方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。