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


C++ TDesC::LocateReverse方法代码示例

本文整理汇总了C++中TDesC::LocateReverse方法的典型用法代码示例。如果您正苦于以下问题:C++ TDesC::LocateReverse方法的具体用法?C++ TDesC::LocateReverse怎么用?C++ TDesC::LocateReverse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TDesC的用法示例。


在下文中一共展示了TDesC::LocateReverse方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SaveDataToFile

void CTangImageDataWriter::SaveDataToFile(const TDesC& aFileName)
	{
	GenerateElementsData();
	
	int pos = aFileName.LocateReverse( '\\');
	if (pos!=KErrNotFound)
		{
		TPtrC dirName = aFileName.Left(pos+1);
		CCoeEnv::Static()->FsSession().MkDirAll(dirName);
		}
		
	RFile file;

	TInt err = file.Replace(CCoeEnv::Static()->FsSession(), aFileName, EFileWrite);
	CleanupClosePushL(file);
	if (KErrNone != err)
		{
		CleanupStack::PopAndDestroy(1); // file
		return;
		}

	RFileWriteStream outputFileStream(file);
	CleanupClosePushL(outputFileStream);
	outputFileStream.WriteL(iRequestXml->Des());

	CleanupStack::PopAndDestroy(2); // outputFileStream, file	
	}
开发者ID:flaithbheartaigh,项目名称:lemonplayer,代码行数:27,代码来源:TangImageDataWriter.cpp

示例2: WriteFileL

TInt CFileOperate::WriteFileL(const TDesC& aFileName)
	{
	int pos = aFileName.LocateReverse( '\\');
	if (pos!=KErrNotFound)
		{
		TPtrC dirName = aFileName.Left(pos+1);
		CCoeEnv::Static()->FsSession().MkDirAll(dirName);
		}

	RFile file;

	TInt err = file.Replace(CCoeEnv::Static()->FsSession(), aFileName, EFileWrite);
	CleanupClosePushL(file);
	if (KErrNone != err)
		{
		CleanupStack::PopAndDestroy(1); // file
		return err;
		}

	RFileWriteStream outputFileStream(file);
	CleanupClosePushL(outputFileStream);

	iNotifier->FileWriteData(outputFileStream);

	CleanupStack::PopAndDestroy(2); // outputFileStream, file
	return KErrNone;
	}
开发者ID:flaithbheartaigh,项目名称:lemonplayer,代码行数:27,代码来源:FileOperate.cpp

示例3: GetExtNameFromFileName

void GetExtNameFromFileName(const TDesC& aFileName, TDes& aExtName)
{
	TInt order = aFileName.LocateReverse('.');
	TInt sourceLength = aFileName.Length() - order -1;
	aExtName = aFileName.Mid(order +1, sourceLength);
	aExtName.LowerCase();
}
开发者ID:flaithbheartaigh,项目名称:lemonplayer,代码行数:7,代码来源:Utils.cpp

示例4: WriteToLogL

void CDebugLogPrint::WriteToLogL(const TDesC &aDes, const TDesC &aDes2)
	{
	TBuf<256> buf;
	TInt pos=aDes.LocateReverse(' ');
	if (pos<0)
		pos=0;
	buf.Copy(aDes.Mid(pos));
	buf.Append(' ');
	buf.Append(aDes2);
	_LIT(KDebugFormatString, "%S");
	RDebug::Print(KDebugFormatString, &buf);
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:12,代码来源:DebLogRD.CPP

示例5: ConstructL

// -----------------------------------------------------------------------------
void CFileLogger::ConstructL(const TDesC &logFileName, EWriteFileMode aMode)
	{
	iFileName.Copy(logFileName);
	iMode = aMode;

	int pos = logFileName.LocateReverse( '\\');
	TPtrC dirName = logFileName.Left(pos+1);

	User::LeaveIfError(iFsSession.Connect());
	iFsSession.MkDirAll(dirName);

	if (iMode == KModeAlwayOpen)
		{
		OpenFile();
		}

	}
开发者ID:flaithbheartaigh,项目名称:lemonplayer,代码行数:18,代码来源:FileLogger.cpp

示例6: GetiniPath

EXPORT_C TInt TEFparser::GetiniPath( TDesC& aBuf, 
									const TDesC& aScriptPath,
									TDes& aIniFilePath)
	{
	
	TInt err = KErrNone;	
	TInt endPos = aScriptPath.LocateReverse('\\');
	if (endPos == KErrNotFound)
		{
		err = KErrNotFound;
		}
	else
		{
		aIniFilePath.Copy(aBuf);
		aIniFilePath.Insert(0, aScriptPath.Left(endPos+1));
		}
	return err;
	}
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:18,代码来源:TEFparser.cpp

示例7: GetFilePathByName

void GetFilePathByName(const TDesC& aFileName, TDes& aFilePath)
{
	TInt filePathLength = aFileName.LocateReverse('\\') + 1;
	aFilePath = aFileName.Mid(0, filePathLength);
}
开发者ID:flaithbheartaigh,项目名称:lemonplayer,代码行数:5,代码来源:Utils.cpp

示例8: GetFileNameByUrl

//从文件路径拆分出文件名
void GetFileNameByUrl(const TDesC& aUrl, TDes& aFileName)
{
	TInt order = aUrl.LocateReverse('/');
	TInt sourceLength = aUrl.Length() - order -1; 
	aFileName = aUrl.Mid(order + 1, sourceLength);
}
开发者ID:flaithbheartaigh,项目名称:lemonplayer,代码行数:7,代码来源:Utils.cpp


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