Commit Graph
55 Commits
Author SHA1 Message Date
Jb Evain fe8d5cb86b 2007-08-15 Jb Evain <[email protected]>
* StringBuilder: hide non 2.1 AppendFormat on 2.1 so that
	the compile picks up the adequate method when AppendFormat
	is used in 2.1 platform code.

svn path=/trunk/mcs/; revision=84160
2007-08-15 19:25:27 +00:00
Miguel de Icaza 9518892a7a 2007-07-28 Miguel de Icaza <[email protected]>
* StringBuilder.cs (Text): Check for null, from Jesse Jones.

svn path=/trunk/mcs/; revision=82913
2007-07-28 15:45:54 +00:00
Miguel de Icaza 8a1af5fd38 2006-11-16 Miguel de Icaza <[email protected]>
* DirectoryInfo.cs (GetFiles): Implement option with SearchOptions
	== AllDirectories

And a lot of MonoTODOs updated as well


svn path=/trunk/mcs/; revision=67998
2006-11-16 14:14:01 +00:00
Zoltan Varga f0036b2e1c 2006-09-03 Zoltan Varga <[email protected]>
* StringBuilder.cs (.ctor): Add a comment.

svn path=/trunk/mcs/; revision=64800
2006-09-03 12:48:54 +00:00
Kornél Pál 55747d218d StringBuilder.cs: Pad the string with NULL characters when setting Length.
svn path=/trunk/mcs/; revision=62421
2006-07-11 00:55:09 +00:00
Gert Driesen b136e2077e * ASCIIEncoding.cs: Marked class ComVisible (true) on 2.0 profile.
Marked 2.0-only members as ComVisible (false).
* Decoder.cs: Marked class ComVisible (true) on 2.0 profile. Marked
2.0-only members as ComVisible (false).
* Encoder.cs: Marked class ComVisible (true) on 2.0 profile. Marked
2.0-only members as ComVisible (false).
* Encoding.cs: Marked class ComVisible (true) on 2.0 profile. Marked
2.0-only members as ComVisible (false).
* NormalizationForm.cs: Marked ComVisible (true).
* StringBuilder.cs: Marked class ComVisible (true) on 2.0 profile.
Marked 2.0-only methods as ComVisible (false).
* UnicodeEncoding.cs: GetString (byte[], int, int) is only available
in 2.0 profile. Marked 2.0-only methods ComVisible (false). Added
missing ctor in 2.0 profile, and marked in MonoTODO.
* UTF7Encoding.cs: Marked class ComVisible (true) on 2.0 profile.
* UTF8Encoding.cs: Marked 2.0-only methods as ComVisible (false).

svn path=/trunk/mcs/; revision=61250
2006-05-30 09:02:37 +00:00
Miguel de Icaza 929bb68814 Apply patch from Mike Glenn\n2006-01-24 Mike Glenn <[email protected]>
* StringBuilder.cs: Avoid computing computation for the string
	length twice.

svn path=/trunk/mcs/; revision=56001
2006-01-24 20:04:42 +00:00
Sebastien Pouliot 69605a115b 2005-11-11 Sebastien Pouliot <[email protected]>
* StringBuilder.cs: Fix ISerializable.GetObjectData (remoting tests 
	were failing under 2.0) and two possible integer overflow in CopyTo.


svn path=/trunk/mcs/; revision=52933
2005-11-11 22:13:20 +00:00
Miguel de Icaza 1a5c713548 Just a snack:
2005-11-11  Miguel de Icaza  <[email protected]>

	* Encoding.cs, UnicodeEncoding.cs: A few 2.x methods. 

	* StringBuilder.cs (Text): Added serialization support in 2.x. 


svn path=/trunk/mcs/; revision=52916
2005-11-11 16:43:36 +00:00
Ben Maurer 0301dca423 In Test/System.Text:
2005-06-21  Ben Maurer  <[email protected]>

	* StringBuilderTest.cs: Test replacing with a longer string.

In System.Text:
2005-06-21  Ben Maurer  <[email protected]>

	* StringBuilder.cs (Replace): Do the correct thing when we replace
	with a longer string. Thanks to Vorobiev Maksim
	<[email protected]>.


svn path=/trunk/mcs/; revision=46333
2005-06-21 22:42:39 +00:00
Ben Maurer 961dc38fb5 2005-05-26 Ben Maurer <[email protected]>
* StringBuilder.cs: Remove = null inits on fields, saves a few
	instructions. When we compare _cached_str == _str, we are only
	interested in pointer based equality, so just do that.


svn path=/trunk/mcs/; revision=45073
2005-05-26 20:14:26 +00:00
Ben Maurer dcd2d2d7d1 In Test/System.Text:
2005-05-06  Ben Maurer  <[email protected]>

	* StringBuilderTest.cs (MaxCapacity_Overflow3): Test for #72244.

In System.Text:
2005-05-06  Ben Maurer  <[email protected]>

	* StringBuilder.cs (InternalEnsureCapacity): It is possible that
	the size we attempt to grow to is more than the max capacity, but
	that a smaller size will do. In this case, don't throw an
	exception. Fixes #72244


svn path=/trunk/mcs/; revision=44166
2005-05-06 20:33:08 +00:00
Ben Maurer f6ae6e99c2 2005-03-20 Ben Maurer <[email protected]>
* StringBuilder.cs (set_Length): If we set the length, we must
	clobber the cached string.

svn path=/trunk/mcs/; revision=42039
2005-03-21 02:21:36 +00:00
Ben Maurer 779e55c5c6 2005-01-31 Ben Maurer <[email protected]>
* StringBuilder.cs (Remove): We need to do the check that the
	string isnt being cached *before* we munge it.


svn path=/trunk/mcs/; revision=39886
2005-02-01 01:01:52 +00:00
Ben Maurer 365cba420a 2005-01-21 Ben Maurer <[email protected]>
* StringBuilder.cs: Don't allocate memory on the .ctor, do it
	lazily. This saves us lots of memory if you only use the
	stringbuilder once. Also, we can allocate on the second Append,
	which might reduce the number of buffers allocated.


svn path=/trunk/mcs/; revision=39337
2005-01-22 01:12:51 +00:00
Lluis Sanchez 43b131cb87 2005-01-14 Lluis Sanches Gual <[email protected]>
* StringBuilder.cs: Improved parameter check.


svn path=/trunk/mcs/; revision=38936
2005-01-14 13:22:43 +00:00
Gonzalo Paniagua Javier 7eadde80f1 2005-01-11 Gonzalo Paniagua Javier <[email protected]>
* System.Text/StringBuilder.cs: when creating the StringBuilder from a
	string, the maximum capacity remains Int32.MaxValue.

	* Test/System.Text/StringBuilderTest.cs: new tests for capacity when
	the StringBuilder is created from a string.


svn path=/trunk/mcs/; revision=38734
2005-01-11 22:03:34 +00:00
Gonzalo Paniagua Javier ba804c8242 2005-01-10 Gonzalo Paniagua Javier <[email protected]>
* System.Text/StringBuilder.cs: throw if the new size is greater than
	the maximum capacity for the StringBuilder. Patch by [email protected].
	Fixes bug #62422.

	* Test/System.Text/StringBuilderTest.cs: patch to test for capacity
	being exceeded.


svn path=/trunk/mcs/; revision=38640
2005-01-10 19:50:21 +00:00
Zoltan Varga 2252b400e4 2004-09-25 Zoltan Varga <[email protected]>
* StringBuilder.cs (Append): Use InternalStrcpy to append char arrays.

svn path=/trunk/mcs/; revision=34402
2004-09-25 19:49:12 +00:00
Tim Coleman 319122710c 2004-09-09 Tim Coleman <[email protected]>
* StringBuilder.cs: Added AppendLine methods for Fx 2.0

svn path=/trunk/mcs/; revision=33657
2004-09-09 14:37:31 +00:00
Gert Driesen b447caed96 * ASCIIEncoding.cs: added TODO for serialization
* StringBuilder.cs: added TODO for serialization
* UnicodeEncoding.cs: added TODO for serialization
* UTF7Encoding.cs: added TODO for serialization
* UTF8Encoding.cs: added TODO for serialization

svn path=/trunk/mcs/; revision=29621
2004-06-15 17:53:18 +00:00
Duncan Mak 13d1764537 Add license and copyright to all source files in corlib
svn path=/trunk/mcs/; revision=29249
2004-06-11 02:09:36 +00:00
Sebastien Pouliot af43a7a510 2004-05-26 Sebastien Pouliot <[email protected]>
* StringBuilder.cs: Fixed potential integer overflows in several
	methods.

svn path=/trunk/mcs/; revision=28155
2004-05-26 13:37:21 +00:00
Gonzalo Paniagua Javier a8749a2e07 2004-03-10 Juraj Skripsky <[email protected]>
* StringBuilder.cs
	(Insert int, char[]): fix by using new string(char[]) instead of
	char[].ToString() and simplify.
	(Insert int, string, int): add LAMESPEC note.
	(Insert int char[], int, int): handle value==null according to spec.
	Use a string instead of char array + Array.Copy (gonzalo)

svn path=/trunk/mcs/; revision=23920
2004-03-11 16:43:28 +00:00
Gonzalo Paniagua Javier 7c40a08237 2004-03-08 Gonzalo Paniagua Javier <[email protected]>
* StringBuilder.cs:
	(Append (string)): remove redundant check.

svn path=/trunk/mcs/; revision=23811
2004-03-08 19:10:22 +00:00
Gonzalo Paniagua Javier 64a94f425c 2004-01-23 Gonzalo Paniagua Javier <[email protected]>
* StringBuilder.cs:
	(Remove): fixed offsets when copying and set the new size. Fixes bug
	#53240.

svn path=/trunk/mcs/; revision=22416
2004-01-23 06:39:17 +00:00
Gonzalo Paniagua Javier ad730dfe6b 2004-01-13 Gonzalo Paniagua Javier <[email protected]>
* StringBuilder.cs: added checks for null in a few Append methods.

svn path=/trunk/mcs/; revision=22032
2004-01-13 21:18:06 +00:00
Paolo Molaro a402c1e3bd Tue Jan 13 22:23:25 CET 2004 Paolo Molaro <[email protected]>
* StringBuilder.cs: fixed start offset in Append(char).

svn path=/trunk/mcs/; revision=22030
2004-01-13 21:08:46 +00:00
Patrik Torstensson 7138482c94 2004-01-12 Patrik Torstensson
* StringBuilder.cs: new implementation that uses
	string as a buffer instead of a array of chars.

svn path=/trunk/mcs/; revision=21984
2004-01-12 22:07:38 +00:00
Ben Maurer c30c1d0945 2003-11-17 Ben Maurer <[email protected]>
* StringBuilder.cs (Insert int, char): It is really silly and
	wasteful to allocate an array here. We can just copy the value
	over.

svn path=/trunk/mcs/; revision=20144
2003-11-17 22:42:53 +00:00
Ben Maurer 30a0ff2ba0 2003-08-21 Ben Maurer <[email protected]>
* String.cs: Created method FormatHelper that does formatting,
	using a StringBuilder.
	* StringBuilder.cs
	(AppendFormat) Use FormatHelper in System.String to avoid
	allocating an extra StringBuilder.
	(Append string, int, int), (Append char, int): Both were
	allocating extra strings.

svn path=/trunk/mcs/; revision=17466
2003-08-21 14:24:14 +00:00
Gonzalo Paniagua Javier 9f9e776fc6 2003-05-10 Gonzalo Paniagua Javier <[email protected]>
* StringBuilder.cs: fixed bug #41397.

svn path=/trunk/mcs/; revision=14440
2003-05-10 03:24:31 +00:00
Paolo Molaro 946eacab12 Fri Apr 11 08:29:50 CEST 2003 Paolo Molaro <[email protected]>
* StringBuilder.cs: cache the result from ToString().

svn path=/trunk/mcs/; revision=13501
2003-04-11 06:37:31 +00:00
Zoltan Varga 4629b55cc5 2003-01-30 Zoltan Varga <[email protected]>
* StringBuilder.cs: fix the constructor: 'value' can be NULL,
	'capacity' must be >=0, use defaultCapacity only if capacity equals 0.
	This fixes the StringBuilder unit tests.

svn path=/trunk/mcs/; revision=11069
2003-01-30 19:37:56 +00:00
Gonzalo Paniagua Javier aa92bc6044 2003-01-30 Gonzalo Paniagua Javier <[email protected]>
* StringBuilder.cs: fixed typo in set_Length.

svn path=/trunk/mcs/; revision=11041
2003-01-30 02:32:51 +00:00
Gonzalo Paniagua Javier 6b9193663b 2002-12-01 Gonzalo Paniagua Javier <[email protected]>
* StringBuilder.cs: fixed constructor. Thanks to marcusU for reporting.

svn path=/trunk/mcs/; revision=9307
2002-12-01 07:57:32 +00:00
Gonzalo Paniagua Javier b2f020a288 2002-11-13 Gonzalo Paniagua Javier <[email protected]>
* StringBuilder.cs: only move the remaining chars in Remove.

svn path=/trunk/mcs/; revision=8973
2002-11-13 18:46:19 +00:00
Gonzalo Paniagua Javier 8df6fef700 2002-08-24 Gonzalo Paniagua Javier <[email protected]>
* StringBuilder.cs: improved performace by using String.InternalCopyTo
	instead of using ToCharArray all over the place (more that 50% of
	speed improvement when using Append).

svn path=/trunk/mcs/; revision=7000
2002-08-24 17:46:16 +00:00
Gonzalo Paniagua Javier 413ae473a2 2002-08-03 Gonzalo Paniagua Javier <[email protected]>
* StringBuilder.cs: added IndexerName to indexer.

svn path=/trunk/mcs/; revision=6384
2002-08-03 18:25:22 +00:00
Gonzalo Paniagua Javier cba87a8845 2002-07-13 Gonzalo Paniagua Javier <[email protected]>
* StringBuilder.cs: updated comments. MaxCapacity always returns
	Int32.MaxValue.

svn path=/trunk/mcs/; revision=5752
2002-07-13 02:19:31 +00:00
Gonzalo Paniagua Javier d999271e76 2002-06-21 Gonzalo Paniagua Javier <[email protected]>
* StringBuilder.cs: implemented AppendFormat methods using
	String.Format. Thanks Paolo!

	This makes xsp generate correct C# output in linux :-). I still need
	to do more testing, though.

svn path=/trunk/mcs/; revision=5388
2002-06-21 10:02:24 +00:00
Nick Drochak 5605e38fe8 2002/04/02 Nick Drochak <[email protected]>
* StringBuilder.cs (Append): Removed obsolete overload.

svn path=/trunk/mcs/; revision=3554
2002-04-02 06:32:01 +00:00
Piers Haken 610d7923ac added missing [Serializable] attribute
svn path=/trunk/mcs/; revision=3540
2002-04-01 20:22:40 +00:00
Paolo Molaro 1eb02adcaf Thu Mar 21 17:38:19 CET 2002 Paolo Molaro <[email protected]>
* StringBuilder.cs: no need to intern the string returned by ToString().

svn path=/trunk/mcs/; revision=3263
2002-03-21 12:48:14 +00:00
Paolo Molaro adfebdc214 Wed Mar 13 00:26:29 CET 2002 Paolo Molaro <[email protected]>
* StringBuilder.cs: make ToString() return a interned string, this
	seems to be required to make switch on string work.

svn path=/trunk/mcs/; revision=3079
2002-03-12 19:38:39 +00:00
Paolo Molaro 317418d3e3 Fri Mar 8 17:29:58 CET 2002 Paolo Molaro <[email protected]>
* StringBuilder.cs: make Append(char) do the smart thing.

svn path=/trunk/mcs/; revision=2995
2002-03-08 12:39:39 +00:00
Ravi Pratap M 9cffbe82ab 2002-01-05 Ravi Pratap <[email protected]>
* ASCIIEncoding.cs, Encoding.cs, UTF7Encoding.cs,
	UnicodeEncoding.cs: MonoTODO attribute marking.

	* StringBuilder.cs : Ditto.

svn path=/trunk/mcs/; revision=1849
2002-01-05 06:11:42 +00:00
Paolo Molaro c441fe5cc6 Wed Nov 14 16:30:27 CET 2001 Paolo Molaro <[email protected]>
* Linux.cs: a '/' is a valid char in a file path.


Wed Nov 14 16:31:19 CET 2001 Paolo Molaro <[email protected]>

	* AppDomain.cs: rename dummy interface _AppDomain to AppDomain_Intf.
	* Array.cs: fix Array.Copy.
	* AssemblyLoadEventArgs.cs: rename field.
	* CLSCompliantAttribute.cs: use correct name for the class.
	* Char.cs: fix IsLetter.
	* Console.cs, DateTime.cs, Decimal.cs, IConvertible.cs, Math.cs,
	SByte.cs, UInt16.cs, UInt32.cs, UInt64.cs, UIntPtr.cs: CLSCompliant updates.
	* Convert.cs: CLSCompliant updates, add ChangeType() methods.
	* Delegate.cs: renamed target field to m_target.
	* Enum.cs: added missing methods.
	* MonoType.cs: add a constructor and some needed properties.
	* Object.cs: implement GetType().
	* String.cs: CLSCompliant updates. Fixes everywhere to remove the
	ending 0 char.
	* Type.cs: add missing methods/properties.


Wed Nov 14 16:45:49 CET 2001 Paolo Molaro <[email protected]>

	* ArrayList.cs: implement ArrayListEnumerator.
	* Hashtable.cs: hardcode the prime number table.


Wed Nov 14 16:47:07 CET 2001 Paolo Molaro <[email protected]>

	* Calendar.cs: CLSCompliant updates.


Wed Nov 14 16:47:47 CET 2001 Paolo Molaro <[email protected]>

	* CheckPermission.cs: disable ModeAccess() code: it's wrong.
	* FileStream.cs: only trow an exception if the read failed in ReadByte().
	* StreamReader.cs: implement Peek and Read.
	* TextWriter.cs: CLSCompliant updates.


Wed Nov 14 16:53:28 CET 2001 Paolo Molaro <[email protected]>

	* Assembly.cs: implement some of the Load() methods.
	* ConstructorInfo.cs: some missing stubs and fields.
	* FieldInfo.cs: IsInitOnly property.
	* ParameterInfo.cs: stubs for missing properties.
	* ParameterModifier.cs: implemented class.


Wed Nov 14 17:01:45 CET 2001 Paolo Molaro <[email protected]>

	* ConstructorBuilder.cs: added missing stubs and some implementation.
	* CustomAttributeBuilder.cs: added.
	* EventBuilder.cs: added.
	* FieldBuilder.cs: updates.
	* MethodBuilder.cs: stuff to implement P/Invoke methods.
	* ModuleBuilder.cs: added GetArrayMethod() stub.
	* ParameterBuilder.cs, PropertyBuilder.cs: updates.
	* TypeBuilder.cs: updates and stubs.


Wed Nov 14 17:02:57 CET 2001 Paolo Molaro <[email protected]>

	* CallingConvention.cs: add missing Winapi.


Wed Nov 14 17:03:30 CET 2001 Paolo Molaro <[email protected]>

	* IFormatterConverter.cs, SerializationInfo.cs: CLSCompliant updates.


Wed Nov 14 17:04:30 CET 2001 Paolo Molaro <[email protected]>

	* MD5CryptoServiceProvider.cs, SHA1CryptoServiceProvider.cs,
	SHA256Managed.cs: CLSCompliant updates.


Wed Nov 14 17:05:22 CET 2001 Paolo Molaro <[email protected]>

	* Encoding.cs: renamed some fields.
	* StringBuilder.cs: CLSCompliant updates.


Wed Nov 14 17:06:18 CET 2001 Paolo Molaro <[email protected]>

	* Overlapped.cs, ThreadPool.cs, Timer.cs: CLSCompliant updates.

svn path=/trunk/mcs/; revision=1351
2001-11-14 15:18:05 +00:00
Nick Drochak e53b2dd204 2001-10-29 Nick Drochak <[email protected]>
* StringBuilder.cs: Throw exceptions when constructor paramter(s) are
		invalid. Just like MS does (as best as I can tell).

	Tests for these exceptions are now added to the unit tests as well.

svn path=/trunk/mcs/; revision=1225
2001-10-29 11:16:03 +00:00
Nick Drochak 6c01336226 2001-10-25 Nick Drochak <[email protected]>
* StringBuilder.cs: Throw exception if they try to make a StringBuilder
		whose capacity is greater than the MaxCapacity.

	I added some tests for the constructors and the above exception. More
	coming soon.

svn path=/trunk/mcs/; revision=1198
2001-10-24 12:27:50 +00:00