stringutils.h

来自「qaSDQDaca<FCSASDAVCASC SDVFDSVDF」· C头文件 代码 · 共 69 行

H
69
字号
/*
* ==============================================================================
*  Name        : 	stringutils.h
*  Part of     : 	OpenCStringUtilsEx
*  Interface   : 
*  Description :  	Header file for stringutils
*  Version     : 
*
*  Copyright (c) 2005-2007 Nokia Corporation.
*  This material, including documentation and any related 
*  computer programs, is protected by copyright controlled by 
*  Nokia Corporation.
* ==============================================================================
*/

#ifndef STRINGUTILS_H
#define STRINGUTILS_H

// INCLUDES
#include <e32cmn.h>
#include <wchar.h>

	 /**
	  * This function converts the tbufC8 to a character string. It is user 
	  * responsibality to allocate a required size of wide-char object. It may
	  * resulting in crash, if the destination object size is smaller than
	  * that of the source.
	  * @param 		aSrc TDesC8 object
	  * @param 		aDes character pointer, to which the resultant string will be copied.
	  * @return		none
	  */
	void tbufC8tochar(TDesC8& aSrc, char* aDes);
	
	 /**
	  * This function converts the tbufC16 to a character string. It is user 
	  * responsibality to allocate a required size of wide-char object. It may
	  * resulting in crash, if the destination object size is smaller than
	  * that of the source.
	  * @param 		aSrc TDesC object
	  * @param 		aDes character pointer, to which the resultant string will be copied.
	  * @return		returns an integer value.
	  * @return		Api returns -1 in case of any error.
	  */
	int tbufC16tochar(TDesC& aSrc, char* aDes);

	 /*
	  * This function converts the character string to a TBuf8. It is user 
	  *	responsibality to allocate a required size of TBuf8 object. It may	
	  * resulting in crash, if the destination object size is smaller than
	  * that of the source.
	  * @param 		aSrc character pointer.
	  * @param 		aDes TBuf8 object, to which the resultant string will be copied.
	  *	@return		none
	  */
	void chartotbuf8(const char* aSrc, TDes8& aDes);

	 /**
	  * This function converts the char to a TBuf16. It is user responsibality 
	  * to allocate a required size of TBuf16 object. It may	resulting in crash,
	  * if the destination object size is smaller than	that of the source.
	  * @param 		aSrc character pointer.
	  * @param 		aDes TBuf16 object, to which the resultant string will be copied.
	  * @return		returns an integer value.
	  * @return		Api returns -1 in case of any error.
	  */
	int chartotbuf16(const char* aSrc, TDes16& aDes);
	
#endif // STRINGUTILS_H

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?