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


C++ TStr::GetUc方法代码示例

本文整理汇总了C++中TStr::GetUc方法的典型用法代码示例。如果您正苦于以下问题:C++ TStr::GetUc方法的具体用法?C++ TStr::GetUc怎么用?C++ TStr::GetUc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TStr的用法示例。


在下文中一共展示了TStr::GetUc方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: TSBase

TFOut::TFOut(const TStr& FNm, const bool& Append, bool& OpenedP):
  TSBase(FNm.CStr()), TSOut(FNm), FileId(NULL), Bf(NULL), BfL(0){
  if (FNm.GetUc()=="CON"){
    FileId=stdout;
  } else {
    if (Append){FileId=fopen(FNm.CStr(), "a+b");}
    else {FileId=fopen(FNm.CStr(), "w+b");}
    OpenedP=(FileId!=NULL);
    if (OpenedP){
      Bf=new char[MxBfL]; BfL=0;}
  }
}
开发者ID:FlyClover,项目名称:movieinf,代码行数:12,代码来源:fl.cpp

示例2: IsIn

bool TSwSet::IsIn(const TStr& WordStr, const bool& UcWordStrP) const {
  if (WordStr.Len()<MnWordLen){
    return true;
  } else {
    if (UcWordStrP){
      return SwStrH.IsKey(WordStr);
    } else {
      TStr UcWordStr=WordStr.GetUc();
      return SwStrH.IsKey(UcWordStr);
    }
  }
}
开发者ID:Accio,项目名称:snap,代码行数:12,代码来源:stopword.cpp

示例3: GetFAccessFromStr

TFAccess TFRnd::GetFAccessFromStr(const TStr& Str){
  TStr UcStr=Str.GetUc();
  if (UcStr=="CREATE"){return faCreate;}
  if (UcStr=="UPDATE"){return faUpdate;}
  if (UcStr=="APPEND"){return faAppend;}
  if (UcStr=="READONLY"){return faRdOnly;}
  if (UcStr=="RESTORE"){return faRestore;}

  if (UcStr=="NEW"){return faCreate;}
  if (UcStr=="CONT"){return faUpdate;}
  if (UcStr=="CONTINUE"){return faUpdate;}
  if (UcStr=="REST"){return faRestore;}
  if (UcStr=="RESTORE"){return faRestore;}
  return faUndef;
}
开发者ID:andrejmuhic,项目名称:qminer,代码行数:15,代码来源:fl.cpp

示例4: Plot

void TGStat::Plot(const TGStatDistr& Distr, const TStr& FNmPref, TStr Desc, bool PowerFit) const {
  if (Desc.Empty()) Desc = FNmPref.GetUc();
  if (! HasDistr(Distr) || Distr==gsdUndef || Distr==gsdMx) { return; }
  TPlotInfo Info = GetPlotInfo(Distr);
  TGnuPlot GnuPlot(Info.Val1+TStr(".")+FNmPref, TStr::Fmt("%s. G(%d, %d)", Desc.CStr(), GetNodes(),GetEdges()));
  GnuPlot.SetXYLabel(Info.Val2, Info.Val3);
  GnuPlot.SetScale(Info.Val4);
  const int plotId = GnuPlot.AddPlot(GetDistr(Distr), gpwLinesPoints, "");
  if (PowerFit) { GnuPlot.AddPwrFit(plotId, gpwLines); }
  #ifdef GLib_MACOSX
  GnuPlot.SaveEps();
  #else
  GnuPlot.SavePng();
  #endif
}
开发者ID:Accio,项目名称:snap,代码行数:15,代码来源:gstat.cpp

示例5: DocStrToChIdV

void TStrParser::DocStrToChIdV(const TStr& _DocStr, TIntV& ChIdV) {
    TStr DocStr = _DocStr.GetUc();  // to upper case
    int ChN = DocStr.Len();
    ChIdV.Reserve(ChN, 0);
    for (int ChC = 0; ChC < ChN; ChC++) {
        TStr ChStr = DocStr.GetSubStr(ChC,ChC);
        int ChId = GetWId(ChStr);
        if (ChId != -1) {
            WordToIdH[ChId]++;
        } else {
            ChId = WordToIdH.AddKey(ChStr);
            WordToIdH[ChId] = 1;
        }
        ChIdV.Add(ChId);
    }
}
开发者ID:Austindeadhead,项目名称:qminer,代码行数:16,代码来源:strkernel.cpp

示例6: GetNrOrgNm

TStr TCordisEuPart::GetNrOrgNm(const TStr& Str){
  TStrV NrStrV; TChA ChA;
  PSwSet SwSet=TSwSet::GetSwSet(swstEnglish523);
  PSIn HtmlSIn=TStrIn::New(Str);
  THtmlLx Lx(HtmlSIn);
  while (Lx.Sym!=hsyEof){
    if ((Lx.Sym==hsyStr)||(Lx.Sym==hsyNum)){
      Lx.UcChA.ChangeCh('Â', 'A');
      Lx.UcChA.ChangeCh('Á', 'A');
      Lx.UcChA.ChangeCh('Ä', 'A');
      Lx.UcChA.ChangeCh('Ã', 'A');
      Lx.UcChA.ChangeCh('À', 'A');
      Lx.UcChA.ChangeCh('Ç', 'C');
      Lx.UcChA.ChangeCh('É', 'E');
      Lx.UcChA.ChangeCh('È', 'E');
      Lx.UcChA.ChangeCh('Ê', 'E');
      Lx.UcChA.ChangeCh('Í', 'I');
      Lx.UcChA.ChangeCh('Ó', 'O');
      Lx.UcChA.ChangeCh('Ö', 'O');
      Lx.UcChA.ChangeCh('Ñ', 'N');
      Lx.UcChA.ChangeCh('Ü', 'U');
      Lx.UcChA.ChangeCh('Ú', 'U');
      TStr NrStr=THtmlLx::GetAsciiStr(Lx.UcChA);
      if ((NrStr.Len()==1)||(SwSet->IsIn(NrStr))||
       (NrStr=="AG")||(NrStr=="GMBH")||(NrStr=="LTD")||(NrStr=="SRL")||
       (NrStr=="SA")||(NrStr=="EV")||(NrStr=="AS")||(NrStr=="AB")||
       (NrStr=="NV")||(NrStr=="BV")||
       (NrStr=="AKTIENGESELLSCHAFT")||(NrStr=="LIMITED")||
       (NrStr=="FUER")||(NrStr=="FUR")){
        NrStr="";}
      if (!NrStr.Empty()){NrStrV.Add(NrStr);}
    }
    Lx.GetSym();
  }
  TChA NrChA;
  for (int NrStrN=0; NrStrN<NrStrV.Len(); NrStrN++){
    if (NrStrN>0){NrChA+=' ';}
    NrChA+=NrStrV[NrStrN];
  }
  if (NrChA.Empty()){
    NrChA=Str.GetUc();
  }
  return NrChA;
}
开发者ID:AlertProject,项目名称:Text-processing-bundle,代码行数:44,代码来源:cordis.cpp

示例7: GetStem

/////////////////////////////////////////////////
// Stemmer
TStr TStemmer::GetStem(const TStr& WordStr, const bool& ToUcP) {
    TStr UCWordStr;
    if (ToUcP) {
        // convert to upper-case
        UCWordStr = WordStr.GetUc();
    } else {
        // not convert to upper-case
        UCWordStr = WordStr;
    }
    // check for synonyms
    TStr SynomymStr;
    if (SynonymStrToWordStr.IsKeyGetDat(UCWordStr, SynomymStr)) {
        UCWordStr=SynomymStr;
    }

    // get stem
    TStemmerType _StemmerType=TStemmerType(int(StemmerType));
    TStr StemStr;
    if (_StemmerType==stmtPorter) {
        StemStr=TPorterStemmer::StemX(UCWordStr);
    } else {
        return UCWordStr;
    }

    // get real word from stem
    if (bool(RealWordP)) {
        TStr RealWordStr;
        if (StemStrToRealWordStrH.IsKeyGetDat(StemStr, RealWordStr)) {
            StemStr=RealWordStr;
        } else {
            StemStrToRealWordStrH.AddDat(StemStr, UCWordStr);
            StemStr=UCWordStr;
        }
    }

    // return stem
    return StemStr;
}
开发者ID:Zala,项目名称:qminer,代码行数:40,代码来源:stemming.cpp

示例8: ImposeDistr

void TGStatVec::ImposeDistr(const TGStatDistr& Distr, const TStr& FNmPref, TStr Desc, const bool& ExpBin, 
    const bool& PowerFit, const TGpSeriesTy& PlotWith, const TStr& Style) const {
  if (Desc.Empty()) Desc = FNmPref.GetUc();
  if (! At(0)->HasDistr(Distr) || Distr==gsdUndef || Distr==gsdMx) { return; }
  TGStat::TPlotInfo Info = At(0)->GetPlotInfo(Distr);
  TGnuPlot GnuPlot(Info.Val1+TStr(".")+FNmPref, TStr::Fmt("%s. G(%d, %d) --> G(%d, %d)", Desc.CStr(),
    At(0)->GetNodes(), At(0)->GetEdges(), Last()->GetNodes(), Last()->GetEdges()));
  GnuPlot.SetXYLabel(Info.Val2, Info.Val3);
  GnuPlot.SetScale(Info.Val4);
  int plotId;
  for (int at = 0; at < Len(); at++) {
    TStr Legend = At(at)->GetNm();
    if (Legend.Empty()) { Legend = At(at)->GetTmStr(); }
    if (! ExpBin) { 
      plotId = GnuPlot.AddPlot(At(at)->GetDistr(Distr), PlotWith, Legend, Style); }
    else { 
      TFltPrV ExpBinV; 
      TGnuPlot::MakeExpBins(At(at)->GetDistr(Distr), ExpBinV, 2, 0);
      plotId = GnuPlot.AddPlot(ExpBinV, PlotWith, Legend, Style);
    }
    if (PowerFit) { GnuPlot.AddPwrFit(plotId, gpwLines); }
  }
  GnuPlot.SavePng();
}
开发者ID:Accio,项目名称:snap,代码行数:24,代码来源:gstat.cpp

示例9: AddBi

void TExpBi::AddBi(const TStr& ExpBiNm, const TExpBiId& ExpBiId,
 const TExpBiArgType& ExpBiArgType){
  ExpBiNmToIdH.AddDat(ExpBiNm.GetUc(), TInt(int(ExpBiId)));
  ExpBiIdToArgTypeH.AddDat(TInt(int(ExpBiId)), TInt(int(ExpBiArgType)));
}
开发者ID:Accio,项目名称:snap,代码行数:5,代码来源:exp.cpp

示例10: IsGifFExt

bool THttp::IsGifFExt(const TStr& FExt){
  return (FExt.GetUc()==TFile::GifFExt.GetUc());
}
开发者ID:AlertProject,项目名称:Text-processing-bundle,代码行数:3,代码来源:http.cpp

示例11: IsHtmlFExt

// file extensions
bool THttp::IsHtmlFExt(const TStr& FExt){
  TStr UcFExt=FExt.GetUc();
  return ((UcFExt==TFile::HtmlFExt.GetUc())||(UcFExt==TFile::HtmFExt.GetUc()));
}
开发者ID:AlertProject,项目名称:Text-processing-bundle,代码行数:5,代码来源:http.cpp

示例12: DocStrToSylIdV

void TStrParser::DocStrToSylIdV(const TStr& _DocStr, TIntV& SyllablesIdV) {
    TStr DocStr = _DocStr.GetUc();  // to upper case
    Fail;
}
开发者ID:Austindeadhead,项目名称:qminer,代码行数:4,代码来源:strkernel.cpp

示例13:

TEST(TStr, EqI) {    
	TStr Mixedcase = "AbCd";
	TStr Empty = "";
	EXPECT_TRUE(Mixedcase.EqI(Mixedcase.GetUc()));    
	EXPECT_TRUE(Empty.EqI(Empty));
}
开发者ID:gitter-badger,项目名称:qminer,代码行数:6,代码来源:test-TStr.cpp


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