bool EWCharString::Remove( int Start_Index, int End_Index )
{
	// Bill changed - this function could not handle removing a single character 
	// - also this didn't remove the character pointed to by End_Index
	if( Start_Index <= End_Index && End_Index < m_pBuffer->m_Data_Length)
	{
		ChecEBufferDoRealloc();

		memcpy( m_pBuffer->Data() + Start_Index, m_pBuffer->Data() + End_Index + 1,
			(StrSize(m_pBuffer->Data()) - End_Index + 1)*sizeof(EWCSChar) );

		m_pBuffer->m_Data_Length -= (End_Index - Start_Index + 1);

		// Bill added - in some cases, removing some characters then inserting fewer
		//              was leaving garbage at the end of the string.  
		//              i.e., the trailing NULL was not being moved.
		(*(m_pBuffer->Data() + m_pBuffer->m_Data_Length)) = 0;

		return true;
	}
	return false;
}
void EWCharString::Reverse()
{
	ChecEBufferDoRealloc();
	
	KReverse( m_pBuffer->Data() );
}
void EWCharString::MakeLower()
{
	ChecEBufferDoRealloc();
	KToLower( m_pBuffer->Data() );
}
Esempio n. 4
0
void EString::MakeUpper()
{
	ChecEBufferDoRealloc();
	KToUpper( m_pBuffer->Data() );
}