Kaydet (Commit) bf246fce authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

a replace() to OUStringBuffer

Change-Id: I2cbfeea9800ad656c49ce1cae7ff1f4b830f1442
Reviewed-on: https://gerrit.libreoffice.org/1139Reviewed-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
Tested-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
üst 07f4845e
......@@ -924,6 +924,26 @@ public:
return *this;
}
/**
Replace all occurrences of
oldChar in this string buffer with newChar.
@since LibreOffice 4.0
@param oldChar the old character.
@param newChar the new character.
@return this string buffer
*/
OUStringBuffer& replace( sal_Unicode oldChar, sal_Unicode newChar )
{
sal_Int32 index = 0;
while((index = indexOf(oldChar, index)) >= 0)
{
pData->buffer[ index ] = newChar;
}
return *this;
}
/** Allows access to the internal data of this OUStringBuffer, for effective
manipulation.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment