本文整理汇总了C++中TChar::LowerCase方法的典型用法代码示例。如果您正苦于以下问题:C++ TChar::LowerCase方法的具体用法?C++ TChar::LowerCase怎么用?C++ TChar::LowerCase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TChar
的用法示例。
在下文中一共展示了TChar::LowerCase方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Normalize
// -----------------------------------------------------------------------------
// TMSAudioDtmfTonePlayer::Normalize
// Lowers case for chars and if its '*','+', or 'w' sets it to asterisk
// char ('*').
// -----------------------------------------------------------------------------
//
void TMSAudioDtmfTonePlayer::Normalize(TChar& tone)
{
TRACE_PRN_FN_ENT;
tone.LowerCase();
TPtrC ast(KPhoneTone_Asterisk);
if (ast.Locate(tone) != KErrNotFound)
{
tone = ast[0];
}
TRACE_PRN_FN_EXT;
}
示例2: ExtractRawNumber
//.........这里部分代码省略.........
if (length==0)
{
return;
}
TPtrC numberPtr( aTextualNumber );
TUint firstChar = numberPtr[0];
//gobble spaces
while (TChar(firstChar).IsSpace())
{
--length;
if (length==0)
{
return;
}
numberPtr.Set(numberPtr.Right(length));
firstChar = numberPtr[0];
}
// Get left hand side
if ( firstChar == KSymbolAsterisk || firstChar == KSymbolHash )
{
//Check if there is plus on first five chars:
TInt newStartPlace = numberPtr.Locate( KSymbolPlus );
if ( newStartPlace>=KPlusWithinChars || newStartPlace==KErrNotFound )
{
// There is always star or hash...
newStartPlace = Max( numberPtr.LocateReverse(KSymbolAsterisk ) ,numberPtr.LocateReverse( KSymbolHash) );
}
length = length - newStartPlace -1;
if ( length <= 0 )
{
return;
}
numberPtr.Set( numberPtr.Right( length ) );
firstChar = numberPtr[0];
}
//test condition to satisfy the removal of '(' the next if
//statement removes the '+' if needed
if ( firstChar == KSymbolOpenBrace )
{
length--;
numberPtr.Set( numberPtr.Right( length ) );
// This may be the only character in the descriptor so only access if
// 1 or more characters left.
if (length > 0 )
{
firstChar = numberPtr[0];
}
}
if ( firstChar == KSymbolPlus )
{
length--;
numberPtr.Set( numberPtr.Right( length ) );
}
if (length==0)
{
return;
}
// Find right hand side
TLex numberLexer( numberPtr );
for ( ; ; )
{
TChar nextChar = numberLexer.Peek();
if ( !nextChar )
{
break;
}
if ( nextChar.IsDigit() )
{
aRawNumber.Append( nextChar );
numberLexer.Inc();
}
else if ( nextChar == KSymbolAsterisk || nextChar == KSymbolHash )
{
aRawNumber.Zero();
return;
}
else
{
nextChar.LowerCase();
if ( nextChar == KSymbolPause
|| nextChar == KSymbolWait
|| nextChar == KSymbolPlus)
{
break;
}
numberLexer.Inc();
}
}
}