本文整理汇总了C++中TDes::Find方法的典型用法代码示例。如果您正苦于以下问题:C++ TDes::Find方法的具体用法?C++ TDes::Find怎么用?C++ TDes::Find使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TDes
的用法示例。
在下文中一共展示了TDes::Find方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Construct
void CIntRangeTestParameter::Construct(TDes& aValue)
{
if(aValue.Find(_L("..")) != KErrNotFound)
{
TInt pos = aValue.Find(_L(".."));
TLex startLex(aValue.Left(pos));
TLex endLex(aValue.Mid(pos+2));
if(startLex.Val(iStart)!=KErrNone)
return;
// checks if startLex is at end of string, if not there was garbage in the string so throw it out
else if(!startLex.Eos())
return;
if(endLex.Val(iFinish)!=KErrNone)
return;
// checks if startLex is at end of string, if not there was garbage in the string so throw it out
else if(!endLex.Eos())
return;
// checks if range is doable
if(iStart > iFinish)
return;
}
else
return;
iValid = ETrue;
}
示例2: ModifyClientUid
// -----------------------------------------------------------------------------
// ModifyClientUid
// -----------------------------------------------------------------------------
//
void CHssIapHandler::ModifyClientUid( TDes& aUid )
{
DEBUG("CHssIapHandler::ModifyClientUid");
TInt indx = aUid.Find( KMark1 );
if ( KErrNotFound != indx )
{
aUid.Delete( indx, 1 );
indx = aUid.Find( KMark2 );
if ( KErrNotFound != indx )
{
aUid.Delete( indx, 1 );
}
}
}
示例3: ModifyClientUid
// -----------------------------------------------------------------------------
// ModifyClientUid
// -----------------------------------------------------------------------------
//
void CHotSpotSession::ModifyClientUid( TDes& aUid )
{
DEBUG("CHotSpotSession::ModifyClientUid");
TInt indx = aUid.Find( KMark1 );
if ( KErrNotFound != indx )
{
aUid.Delete( indx, 1 );
indx = aUid.Find( KMark2 );
if ( KErrNotFound != indx )
{
aUid.Delete( indx, 1 );
}
}
}
示例4: StripExtension
void CCmdTestSsmCommand::StripExtension( TDes& aFilename )
{
TInt dot = aFilename.Find( _L(".") );
if( KErrNotFound != dot)
{
aFilename.SetLength( dot );
}
}
示例5: StripExtension
/**
Helper function to strip extension
*/
void CGsaFlexiMergeManyFilesTest::StripExtension(TDes& aFilename)
{
TInt dot = aFilename.Find(_L("."));
if(KErrNotFound != dot)
{
aFilename.SetLength(dot);
}
}
示例6: GetItem
// ---------------------------------------------------------------------------
// CAknMemorySelectionModelMultiDrive::GetItem
// ---------------------------------------------------------------------------
//
void CAknMemorySelectionModelMultiDrive::GetItem( TInt aIndex, TDes& aItem )
{
aItem = iListBoxArray[ aIndex ]->Des();
if( iLayout == ELayoutPopupMenu || iLayout == ELayoutDoublePopup )
{
// On layout with graphic, delete image index.
_LIT( KTab, "\t" );
TInt tabIndex( aItem.Find( KTab ) );
if( tabIndex >= 0 )
{
aItem.Delete( 0, tabIndex + 1 );
}
if( iLayout == ELayoutDoublePopup )
{
tabIndex = aItem.Find( KTab );
if( tabIndex >= 0 )
{
aItem = aItem.Left( tabIndex );
}
}
}
}
示例7: AdjustLanguageName
// ---------------------------------------------------------
// Adjust language name
// ---------------------------------------------------------
//
void CGSPenInputModel::AdjustLanguageName(TInt aLangId, TDes& aLangName)
{
switch(aLangId)
{
case ELangPrcChinese:
case ELangHongKongChinese:
case ELangTaiwanChinese:
{
TInt index = aLangName.Find(KLeftBracket);
if( index != KErrNotFound)
{
aLangName.SetLength(index);
}
}
}
}