本文整理汇总了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;}
}
}
示例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);
}
}
}
示例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;
}
示例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
}
示例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);
}
}
示例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;
}
示例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;
}
示例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();
}
示例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)));
}
示例10: IsGifFExt
bool THttp::IsGifFExt(const TStr& FExt){
return (FExt.GetUc()==TFile::GifFExt.GetUc());
}
示例11: IsHtmlFExt
// file extensions
bool THttp::IsHtmlFExt(const TStr& FExt){
TStr UcFExt=FExt.GetUc();
return ((UcFExt==TFile::HtmlFExt.GetUc())||(UcFExt==TFile::HtmFExt.GetUc()));
}
示例12: DocStrToSylIdV
void TStrParser::DocStrToSylIdV(const TStr& _DocStr, TIntV& SyllablesIdV) {
TStr DocStr = _DocStr.GetUc(); // to upper case
Fail;
}
示例13:
TEST(TStr, EqI) {
TStr Mixedcase = "AbCd";
TStr Empty = "";
EXPECT_TRUE(Mixedcase.EqI(Mixedcase.GetUc()));
EXPECT_TRUE(Empty.EqI(Empty));
}