本文整理汇总了C++中ECString::length方法的典型用法代码示例。如果您正苦于以下问题:C++ ECString::length方法的具体用法?C++ ECString::length怎么用?C++ ECString::length使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ECString
的用法示例。
在下文中一共展示了ECString::length方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pHegt
float
Pst::
pegt(ECString& sh, int t)
{
int len = sh.length();
if(len < 3) return .01;
ECString e = sh.substr(len -2, 2);
float phegt = pHegt(e,t);
return phegt;
}
示例2:
bool
hasAuxSuf( ECString word )
{
size_t pos = word.find_first_of("\'");
if(pos == -1) return false;
ECString apostrophe = word.substr(pos, word.length()-pos);
for( int i = 0; suffixes[i]; i++)
{
if( apostrophe == suffixes[i] )
return true;
}
return false;
}
示例3: sh
double
Pst::
pCapgt(const ECString& shU, int t, int word_num)
{
if(word_num == 0) return 1;
//cerr << "pCapgt = " << pcap << endl;
if(shU.length() < 2) return 1; //ignore words of length 1;
char temp[1024];
ECString sh(langAwareToLower(shU.c_str(),temp));
bool cap = false;
if(shU[0] != sh[0] && shU[1] == sh[1]) cap = true;
double pcap = pHcapgt(t);
return cap ? pcap : (1 - pcap);
}
示例4:
int
whichEmpty(const ECString& emp)
{
//return 1; // should make system not require empty type to be correct.
if(emp == "0") return NULLEMP;
if(emp == "*U*") return UNITEMP;
int sz = emp.length();
if(sz < 1)
{
return 0;
}
if(sz >= 5)
{
//ECString emp1(emp.substr(0, 5));
ECString emp1(emp,0,5);
if(emp1 == "*NOT*") return NOTEMP;
if(emp1 == "*RNR*") return RNREMP;
if(emp1 == "*ICH*") return ICHEMP;
if(emp1 == "*EXP*") return EXPEMP;
if(emp1 == "*PPA*") return PPAEMP;
}
if(sz >= 3)
{
//ECString emp1(emp.substr(0, 3));
ECString emp1(emp,0, 3);
if(emp1 == "*T*")
{
return TREMP;
}
if(emp1 == "*NOT*") return NOTEMP;
if(emp1 == "*?*") return QEMP;
}
//ECString emp2(emp.substr(0,1));
ECString emp2(emp,0,1);
if(emp2 == "*") return NPEMP;
return 0;
}