add a insertor of Unicode single element

This commit is contained in:
Edouard Dupin 2012-05-11 17:35:48 +02:00
parent ee8530decd
commit 16136c4b30
2 changed files with 26 additions and 0 deletions

View File

@ -115,6 +115,14 @@ etk::UString::UString(const uniChar_t* inputData, int32_t len)
m_data.PushBack('\0');
Set(inputData, len);
}
/*
etk::UString::UString(const uniChar_t inputData)
{
m_data.Clear();
m_data.PushBack('\0');
Set(&inputData, 1);
}
*/
void etk::UString::Set(const char * inputData, int32_t len)
{
@ -580,6 +588,22 @@ void etk::UString::Add(int32_t currentID, const uniChar_t* inputData)
m_data.Insert(currentID, inputData, len);
}
/**
* @brief
*
* @param[in,out]
*
* @return
*
*/
void etk::UString::Add(int32_t currentID, const uniChar_t inputData)
{
uniChar_t data[2];
data[0] = inputData;
data[1] = 0;
Add(currentID, data);
}
/**
* @brief

View File

@ -46,6 +46,7 @@ namespace etk
UString(float inputData);
UString(double inputData);
UString(const etk::UString &etkS);
//UString(const uniChar_t inputData);
// destructor :
~UString(void);
@ -126,6 +127,7 @@ namespace etk
*****************************************************/
void Add(int32_t currentID, const char* inputData);
void Add(int32_t currentID, const uniChar_t* inputData);
void Add(int32_t currentID, const uniChar_t inputData);
void Remove(int32_t currentID, int32_t len);
void Clear(void);