+ // Remove the characters from the text and the styles.
+ const std::size_t firstCharacterIndex = textInfoIndicesBegin.mCharacterParagraphIndex;
+ const std::size_t lastCharacterIndex = textInfoIndicesEnd.mCharacterParagraphIndex + 1u;
+
+ paragraphLayout.mText.Remove( firstCharacterIndex, lastCharacterIndex - firstCharacterIndex );
+
+ for( Vector<TextStyle*>::Iterator it = paragraphLayout.mTextStyles.Begin() + firstCharacterIndex,
+ endIt = paragraphLayout.mTextStyles.Begin() + lastCharacterIndex;
+ it != endIt;
+ ++it )
+ {
+ delete *it;
+ }
+ paragraphLayout.mTextStyles.Erase( paragraphLayout.mTextStyles.Begin() + firstCharacterIndex,
+ paragraphLayout.mTextStyles.Begin() + lastCharacterIndex );
+