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


C++ TDes::Find方法代码示例

本文整理汇总了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;
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:27,代码来源:testparameter.cpp

示例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 );
            }
        }
    }
开发者ID:gvsurenderreddy,项目名称:symbiandump-mw4,代码行数:18,代码来源:hssiaphandler.cpp

示例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 );
            }
        }
    }
开发者ID:gvsurenderreddy,项目名称:symbiandump-mw4,代码行数:18,代码来源:hotspotsession.cpp

示例4: StripExtension

void CCmdTestSsmCommand::StripExtension( TDes& aFilename )
	{
	TInt dot = aFilename.Find( _L(".") );
	
	if( KErrNotFound != dot)
		{
		aFilename.SetLength( dot );
		}
	}	
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:9,代码来源:tcmd_step_ssmcommand.cpp

示例5: StripExtension

/**
Helper function to strip extension
*/
void CGsaFlexiMergeManyFilesTest::StripExtension(TDes& aFilename)
	{
	TInt dot = aFilename.Find(_L("."));

	if(KErrNotFound != dot)
		{
		aFilename.SetLength(dot);
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:12,代码来源:tgsa_step_fleximergemanyfiles.cpp

示例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 );
                }
            }
        }
    }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:26,代码来源:caknmemoryselectionmodelmultidrive.cpp

示例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);
                }
            }
        }
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:20,代码来源:gspeninputmodel.cpp


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