Skip to content

Commit

Permalink
from head
Browse files Browse the repository at this point in the history
svn path=/branches/mono-1-1-8/mcs/; revision=46811
  • Loading branch information
gonzalop committed Jun 30, 2005
1 parent 5af44be commit 6117e7c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mcs/class/corlib/System.Text/ChangeLog
@@ -1,3 +1,9 @@
2005-06-21 Ben Maurer <bmaurer@ximian.com>

* StringBuilder.cs (Replace): Do the correct thing when we replace
with a longer string. Thanks to Alexander Beznozdrev
<abeznozdrev@croc.ru>

2005-05-26 Ben Maurer <bmaurer@ximian.com>

* Encoding.cs: Use static object for locking. `volatile' to
Expand Down
3 changes: 3 additions & 0 deletions mcs/class/corlib/System.Text/StringBuilder.cs
Expand Up @@ -296,7 +296,10 @@ public StringBuilder Replace( string oldValue, string newValue, int startIndex,

InternalEnsureCapacity (replace.Length + (_length - count));

string end = _str.Substring (startIndex + count, _length - startIndex - count );

String.InternalStrcpy (_str, startIndex, replace);
String.InternalStrcpy (_str, startIndex + replace.Length, end);

_length = replace.Length + (_length - count);

Expand Down

0 comments on commit 6117e7c

Please sign in to comment.