Commit Graph
75 Commits
Author SHA1 Message Date
Rodrigo Kumpera 1b92a4148c Since MOBILE implies NET_4_* now, take this into account and simplify our ifdefs. 2013-02-11 18:42:18 -05:00
Rodrigo Kumpera b96d05dac3 Kill the MOONLIGHT define in corlib. 2013-02-11 16:03:28 -05:00
Rodrigo Kumpera 83dccf8fe7 Add all missing sequential layout directives to corlib and system. 2011-12-13 11:57:23 -02:00
Miguel de Icaza 083d1cfe2c Updated with Xamarin copyrights 2011-11-23 22:43:03 -05:00
Paolo Molaro 8397d2885e Fixed StringBuilder.Clear() to properly clear the cached string. 2011-11-22 12:04:05 +01:00
Geoff Norton 16d4fd790b Further .NET 4.0 ification of the mobile profile 2011-01-25 20:10:54 -05:00
Rolf Bjarne Kvinge ab0f056e62 2010-06-18 Rolf Bjarne Kvinge <[email protected]>
* StringBuilder.cs: Moonlight needs Clear too.

svn path=/trunk/mcs/; revision=159110
2010-06-17 23:46:43 +00:00
Jb Evain e73cf2586e use MOONLIGHT symbol
svn path=/trunk/mcs/; revision=153659
2010-03-16 12:13:57 +00:00
Mark Probst 860083dcf1 2009-12-05 Mark Probst <[email protected]>
* String.cs: A new LOS_limit variable which gives the maximum
        string length that's not put in the LOS.

        * StringBuilder.cs: Copy the string also if it's in the LOS and
        chopping it would bring its size below the LOS limit.

        * Environment.cs: Bump corlib version.

svn path=/trunk/mcs/; revision=147732
2009-12-05 03:25:18 +00:00
Miguel de Icaza 53d746c7a1 2009-11-02 Miguel de Icaza <[email protected]>
* Jumbo patch to drop support for pre-NET_2_0 code:

        Remove NET_2_0 defines assuming the value is true.


svn path=/trunk/mcs/; revision=145232
2009-11-03 00:27:28 +00:00
Marek Safar 1b867ceb4d Fixed Clear signature
svn path=/trunk/mcs/; revision=144617
2009-10-22 09:09:19 +00:00
Miguel de Icaza b76c346a16 oops
svn path=/trunk/mcs/; revision=144602
2009-10-22 06:16:10 +00:00
Geoff Norton 1de989baa2 make these public on monotouch
svn path=/trunk/mcs/; revision=144326
2009-10-18 17:10:45 +00:00
Gonzalo Paniagua Javier 58ee030265 2009-07-26 Gonzalo Paniagua Javier <[email protected]>
* StringBuilder.cs: don't throw on null values in ctor(string, int).
	Unify another ctor into the main one to account for MaxCapacity.


svn path=/trunk/mcs/; revision=138692
2009-07-26 17:08:10 +00:00
Gonzalo Paniagua Javier 02d4790b5d 2009-07-26 Gonzalo Paniagua Javier <[email protected]>
* StringBuilder.cs: small fixes dealing with _maxCapacity.


svn path=/trunk/mcs/; revision=138686
2009-07-26 16:26:55 +00:00
Juraj Skripsky bc9fd8e27d 2008-09-28 Juraj Skripsky <[email protected]>
* String.cs (ReplaceUnchecked): Avoid any unnecessary work and 
	string allocations by returning early when no oldValue was found.

2008-09-08  Juraj Skripsky  <[email protected]>

	* StringBuilder.cs (Replace): Return early when no oldValue was 
	found. Avoid extra string allocations.

svn path=/trunk/mcs/; revision=114321
2008-09-28 08:22:28 +00:00
Juraj Skripsky 169c1ff0f6 2008-06-01 Juraj Skripsky <[email protected]>
* StringBuilder.cs (ToString): Use String.SubstringUnchecked instead
	of String.Substring, as the former is guaranteed to create a new
	string object. Fixes bug #395904.

	* String.cs (Substring): Blocking bug #395904 has been fixed,
	re-enable optimization.

	* StringTest.cs (Substring2): Blocking bug #395904 has been fixed,
	re-enable test.


svn path=/trunk/mcs/; revision=104629
2008-06-01 17:57:48 +00:00
Andreas N 7b48206118 2008-05-15 Andreas Nahr <[email protected]>
* StringBuilder.cs: Resubmit uncritical parts of String cleanup patch

svn path=/trunk/mcs/; revision=103327
2008-05-15 22:16:16 +00:00
Miguel de Icaza de8d832cb1 Revert this patch, it regressed the compiler and System.Web
svn path=/trunk/mcs/; revision=99708
2008-04-02 23:21:34 +00:00
Andreas N d4040600dc 2008-04-01 Andreas Nahr <[email protected]>
* String.cs: Update of String that moves all remaining non-culture-sensitive
	  code to managed C# code. Improves performance for most cases and most methods
	  allows code-optimizations tools to perform better optimizations by removing the
	  internalcalls. Reduces the total number of lines of code used for String.
	  Allows code duplication reduction in several other classes and the runtime.

	* StringComparer.cs: Remove duplicate code and call relevant String methods.

	* StringBuilder.cs: Use the new managed String functions.

svn path=/trunk/mcs/; revision=99569
2008-04-01 19:42:34 +00:00
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