Commit Graph
47 Commits
Author SHA1 Message Date
Marek Safar ea8879d7bf Maintain only single version of ordinal string comparers 2013-03-02 22:24:26 +01:00
Marek Safar bb05074a9f Replace some hashtables with dictionaries 2013-02-27 22:58:32 +01:00
Rodrigo Kumpera b96d05dac3 Kill the MOONLIGHT define in corlib. 2013-02-11 16:03:28 -05:00
Marek Safar 9d5de96540 Update culture infos and implement missing or not implemented members 2012-05-15 09:44:22 +01:00
Rodrigo Kumpera 83dccf8fe7 Add all missing sequential layout directives to corlib and system. 2011-12-13 11:57:23 -02:00
Atsushi Eno 8277f4a527 Fix bug #687444, null-character handling is now closer and as illogical as .NET. 2011-04-14 21:11:10 +09:00
Zoltan Varga 0d4aa9fc89 2010-04-19 Zoltan Varga <[email protected]>
* CompareInfo.cs (IndexOf): Return startIndex instead of 0 for empty strings.
	Fixes #597604.

svn path=/trunk/mcs/; revision=155698
2010-04-19 08:28:50 +00:00
Jb Evain 116b2ee12f use MOONLIGHT symbol
svn path=/trunk/mcs/; revision=153664
2010-03-16 12:15:11 +00:00
Sebastien Pouliot 3594bcce41 In Test/System.Globalization:
2009-10-29  Sebastien Pouliot  <[email protected]>

	* CompareInfoTest.cs: Add test cases to validate parameters

In System.Globalization:
2009-10-29  Sebastien Pouliot  <[email protected]>

	* CompareInfo.cs: Add/fix CompareOptions validations. Reduce code
	duplication in Compare methods (wrt CompareOptions). Fix 
	calculation bug	in Compare(string,int.string,int,CompareOptions).


svn path=/trunk/mcs/; revision=145023
2009-10-29 14:11:53 +00:00
Miguel de Icaza 0204abe803 Drop more obsolete defines
svn path=/trunk/mcs/; revision=144304
2009-10-17 01:35:27 +00:00
Sebastien Pouliot 58407b336c 2009-10-07 Sebastien Pouliot <[email protected]>
* CompareInfo.cs: Don't allow MONO_DISABLE_MANAGED_COLLATION
	override for Moonlight and move all icalls together so they
	can be #if-ed out.


svn path=/trunk/mcs/; revision=143648
2009-10-07 13:40:12 +00:00
Atsushi Eno 28ac67adbc 2009-01-07 Atsushi Enomoto <[email protected]>
* CompareInfo.cs : Fixed bug #462957. With empty target string it
	  should always return 0.

	* CompareInfoTest.cs : added test for #462957.


svn path=/trunk/mcs/; revision=122602
2009-01-07 02:43:34 +00:00
Marek Safar cc9c53a109 Warnings cleanup
svn path=/trunk/mcs/; revision=111713
2008-08-27 15:40:13 +00:00
Andreas N db48a3744a 2008-07-03 Andreas Nahr <[email protected]>
* TextInfo.cs: Fix exceptions
	* StringInfo.cs
	* SortKey.cs:
	* RegionInfo.cs:
	* NumberFormatInfo.cs:
	* CultureInfo.cs:
	* CompareInfo.cs:
	* CharUnicodeInfo.cs: Fix parameter names

svn path=/trunk/mcs/; revision=107189
2008-07-03 20:50:47 +00:00
Zoltan Varga 18eb3c8a37 2008-06-28 Zoltan Varga <[email protected]>
* CompareInfo.cs: Add a cache of SimpleCollator objects.

svn path=/trunk/mcs/; revision=106850
2008-06-29 02:01:27 +00:00
Atsushi Eno b37c03e3ca 2007-07-09 Atsushi Enomoto <[email protected]>
* CompareInfo.cs : Name.
	* PersianCalendar.cs : missing members.
	* NumberFormatInfo.cs HijriCalendar.cs CultureInfo.cs TextInfo.cs
	  HebrewCalendar.cs ThaiBuddhistCalendar.cs GregorianCalendar.cs
	  KoreanCalendar.cs JulianCalendar.cs TaiwanCalendar.cs
	  JapaneseCalendar.cs DaylightTime.cs EastAsianLunisolarCalendar.cs
	  RegionInfo.cs TextElementEnumerator.cs : ComVisible cleanup.


svn path=/trunk/mcs/; revision=81625
2007-07-09 10:10:35 +00:00
Miguel de Icaza d85383187d Fix CompareInfo from David Mitchell ([email protected]), fixes bug 80904
svn path=/trunk/mcs/; revision=73760
2007-03-05 21:29:53 +00:00
Chris Toshok e0a3893721 2006-01-24 Chris Toshok <[email protected]>
[ these fix nunit built with MS .net 2.0, running on mono.  nunit
	apparently stores all manner of things in its resources ]
	
	* NumberFormatInfo.cs: add unused nativeDigits and
	digitSubstitution fields that MS serializes.

	* DateTimeFormatInfo.cs: serialization fixes.  MS apparently
	stores (and serializes) a couple of fields as ints, but exposes
	them to programmers as Enum's.
	
	* CompareInfo.cs: add unused m_name field that MS serializes.

	* GregorianCalendar.cs: add a couple of unused fields that MS serializes.


svn path=/trunk/mcs/; revision=71620
2007-01-24 19:27:56 +00:00
Atsushi Eno c6d95c708e 2007-01-22 Atsushi Enomoto <[email protected]>
* CompareInfo.cs : there was a test which raises assertion failure
	  if there isn't paramName for ArgumentException. Quite odd one.


svn path=/trunk/mcs/; revision=71449
2007-01-22 17:39:21 +00:00
Atsushi Eno fec2a9c3ae 2007-01-07 Atsushi Enomoto <[email protected]>
* CompareInfo.cs : GetSortKey() does not allow Ordinal and 
	  OrdinalIgnoreCase in 2.0 (shuold be also prohibited in 1.x BTW).


svn path=/trunk/mcs/; revision=70628
2007-01-08 07:54:45 +00:00
Atsushi Eno 3064a0316d 2006-12-25 Atsushi Enomoto <[email protected]>
* SimpleCollator.cs : added IndexOf() implementation for Ordinal
	  and OrdinalIgnoreCase, though Ordinal version is not used (since
	  it is slower than icall).

	* CompareInfo.cs : for OrdinalIgnoreCase, IndexOf() and LastIndexOf()
	  will use managed version (icalls for them are case sensitive).
	  Removed MonoTODOs.

	* CompareInfoTest.cs : added tests for OrdinalIgnoreCase versions
	  of IndexOf() and LastIndexOf(). Added Ordinal LastIndexOf() tests.


svn path=/trunk/mcs/; revision=70037
2006-12-25 09:45:38 +00:00
Atsushi Eno 6fe325aede 2006-11-27 Atsushi Enomoto <[email protected]>
* CompareInfo.cs : fixed wrong || with && for OrdinalIgnoreCase.
	  Fixed bug #80056.

	* CompareInfoTest.cs : why there was "return" before OrdinalIgnoreCase
	  tests ...


svn path=/trunk/mcs/; revision=68492
2006-11-27 03:41:18 +00:00
Miguel de Icaza 1ded59163d Improved the MonoTODO messages, as these will be developer visible
2006-11-16  Miguel de Icaza  <[email protected]>

	* Hashtable.cs: Serialize EqualityComparer.


svn path=/trunk/mcs/; revision=67996
2006-11-16 13:33:32 +00:00
Marek Safar 6a6ad9d1c8 2006-11-09 Marek Safar <[email protected]>
* CompareInfo.cs: Cache full UseManagedCollation value;
	* CultureInfo.cs (Parent): Add caching to avoid re-creating culture info
	  every time when the property is used.
	* TextInfo.cs: Removed unused field.

svn path=/trunk/mcs/; revision=67623
2006-11-09 18:29:51 +00:00
Atsushi Eno d0f67963c3 2005-11-29 Atsushi Enomoto <[email protected]>
* CompareInfo.cs : IsSortable() are static.
	* CharUnicodeInfo.cs : became non-static in RTM.
	* Calendar.cs : added support for Clone() and IsReadOnly.
	* HijriCalendar.cs ThaiBuddhistCalendar.cs HebrewCalendar.cs
	  GregorianCalendar.cs KoreanCalendar.cs JulianCalendar.cs
	  TaiwanCalendar.cs JapaneseCalendar.cs PersianCalendar.cs :
	  check IsReadOnly on every setter.


svn path=/trunk/mcs/; revision=53615
2005-11-29 03:53:05 +00:00
Atsushi Eno 4a34097273 2005-11-14 Atsushi Enomoto <[email protected]>
* CompareInfo.cs : added support for OrdinalIgnoreCase.

	* CompareInfoTest.cs : added test for Compare() w/ OrdinalIgnoreCase.


svn path=/trunk/mcs/; revision=53004
2005-11-14 09:50:17 +00:00
Miguel de Icaza 68d61746c8 Reduce the pending stuff from corlib 2.x
2005-10-31  Miguel de Icaza  <[email protected]>

	* HijriCalendar.cs, HebrewCalendar.cs, JulianCalendar.cs,
	GregorianCalendar.cs, JapaneseCalendar.cs, Calendar.cs,
	TaiwanCalendar.cs, HijriCalendar.cs: Add
	CalendarAlgorithmType, MinSupportedDateTime, MaxSupportedDateTime
	properties. 

	* Added ComVisibleAttribute in a bunch of places, using the fully
	qualified name to speed up cut and paste.
	


svn path=/trunk/mcs/; revision=52426
2005-10-31 22:44:02 +00:00
Atsushi Eno b1f8929250 2005-09-21 Atsushi Enomoto <[email protected]>
* CompareInfo.cs : switched to "managed collation by default" mode.


svn path=/trunk/mcs/; revision=50415
2005-09-21 20:43:05 +00:00
Sebastien Pouliot 96da5dbf14 2005-08-30 Sebastien Pouliot <[email protected]>
* CompareInfo.cs: Use Environment.internalGetEnvironmentVariable as
	the .cctor gets executed before the security manager is ready to be
	activated (and cause recursion with --security).


svn path=/trunk/mcs/; revision=49139
2005-08-30 17:15:14 +00:00
Atsushi Eno 3f6124b2b8 2005-08-10 Atsushi Enomoto <[email protected]>
* CompareInfo.cs : added IsSortable(). (NET_2_0)


svn path=/trunk/mcs/; revision=48222
2005-08-10 13:26:06 +00:00
Gert Driesen 5fca61c843 * CompareInfo.cs: Marked UseManagedCollation internal to have API
match that of MS.NET.

svn path=/trunk/mcs/; revision=48138
2005-08-08 17:04:33 +00:00
Atsushi Eno 3cabacd62c 2005-08-08 Atsushi Enomoto <[email protected]>
* corlib.dll.sources : added managed collation classes
	* Makefile : added resources to build.
	* resources : new directory for collation table resources.

	* String.cs : (StartsWith) compared string lengths are not always the
	  same in culture-sensitive comparison.

	* CompareInfo.cs :
	  Added managed collation support. It won't be activated unless you 
	  explicitly set environment MONO_USE_MANAGED_COLLATION=yes.

	* create-mscompat-collation-table.cs,
	  Makefile : changed resources output directory.



svn path=/trunk/mcs/; revision=48103
2005-08-08 06:19:42 +00:00
Atsushi Eno bf2bc65403 2005-08-02 Atsushi Enomoto <[email protected]>
* CompareInfo.cs : LastIndexOf() which takes startIndex without length
	  should use startIndex+1 as length.


svn path=/trunk/mcs/; revision=47929
2005-08-02 19:16:12 +00:00
Atsushi Eno 3231e4f5cb 2005-07-12 Atsushi Enomoto <[email protected]>
* CompareInfo.cs : IndexOf(string, char, ...) overloads must not
	  specify start as 0. Use source.Length - 1 instead.


svn path=/trunk/mcs/; revision=47196
2005-07-12 10:10:54 +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
Lluis Sanchez 1940817233 * CompareInfo.cs, CultureInfo.cs, NumberFormatInfo.cs, TextInfo.cs:
Made those serializable-compatible with MS.NET: modified fields names to
	match MS.NET ones, and in CultureInfo added a flag to control when a
	deserialized instance need to be initialized.

svn path=/trunk/mcs/; revision=25218
2004-04-08 14:10:11 +00:00
Gonzalo Paniagua Javier b06a6911d4 lalala
svn path=/trunk/mcs/; revision=25205
2004-04-08 03:59:15 +00:00
Jackson Harper e5ac52c12a * CultureInfo.cs: Use new ICUless implementation in the runtime.
* CompareInfo.cs: Get ICU name from a cultureinfo object instead
	of looking it up in the culture map.
	* RegionInfo.cs: Dont check if the LCID is neutral unless its not
	found in the switch. Avoids an icall.

svn path=/trunk/mcs/; revision=25160
2004-04-07 16:20:39 +00:00
Ben Maurer d7a9edb89b 2003-12-20 Ben Maurer <[email protected]>
* CompareInfo.cs: Replace blah == "" with blah.Length == 0.
	MUCH faster. Note, we dont need to check for nulls, because
	the properties were used in other places.

svn path=/trunk/mcs/; revision=21382
2003-12-20 17:19:45 +00:00
Dick Porter d7f3590b36 2003-12-19 Dick Porter <[email protected]>
* String.cs: Added Compare shortcut for length==0.

2003-12-19  Dick Porter  <[email protected]>

	* CompareInfo.cs: Added assorted shortcuts when comparing empty
	strings.  Fixed offset and length range checks to flag when <0.
	Broke test that offset >= string length to match actual ms
	behaviour (sigh.)  Fixes bug 52310.

2003-12-19  Dick Porter  <[email protected]>

	* StringTest.cs: Added Compare test for length==0.

2003-12-19  Dick Porter  <[email protected]>

	* CompareInfoTest.cs: Added some Compare tests

svn path=/trunk/mcs/; revision=21341
2003-12-19 14:15:05 +00:00
Dick Porter 90562882fb 2003-12-06 Dick Porter <[email protected]>
* String.cs: Don't use CompareInfo for non-culture-sensitive
	IndexOf and LastIndexOf methods.

2003-12-06  Dick Porter  <[email protected]>

	* CompareInfo.cs: Don't build strings in Compare, IndexOf and
	LastIndexOf methods.  Avoid the icall in IndexOf and LastIndexOf
	if the search parameter is a char and the CompareOptions include
	Ordinal.

svn path=/trunk/mcs/; revision=20820
2003-12-06 16:54:59 +00:00
Dick Porter 190b0a5060 2003-12-04 Dick Porter <[email protected]>
* CompareInfo.cs: Implement the deserialization callback

	* CultureInfo.cs: Allow CompareInfo to see the CultureMap so that
	it can construct the ICU collator itself

svn path=/trunk/mcs/; revision=20776
2003-12-04 15:01:04 +00:00
Dick Porter c72b1a0824 2003-12-01 Dick Porter <[email protected]>
* String.cs: Make Compare, IndexOf, LastIndexOf, StartsWith,
	Replace, ToLower, ToUpper and Equals use the correct CultureInfo.

2003-12-01  Dick Porter  <[email protected]>

	* CultureInfo.cs: Culture name creation is case-insensitive.
	Implemented CurrentCulture and CurrentUICulture.

	* CompareInfo.cs: Fix IndexOf and LastIndexOf so that they work
	for combining characters.

2003-12-01  Dick Porter  <[email protected]>

	* Thread.cs: Implement CurrentCulture and CurrentUICulture

2003-12-01  Dick Porter  <[email protected]>

	* CaseInsensitiveComparer.cs: Construct the default comparers when
	they're needed, to avoid a dependency loop with CultureInfo's
	constructor.

svn path=/trunk/mcs/; revision=20663
2003-12-01 12:04:49 +00:00
Dick Porter 49f6ddf3f2 2003-10-09 Dick Porter <[email protected]>
* CultureInfo.cs: Implemented, with internal calls to ICU apart
	from the Invariant culture.

	* SortKey.cs:
	* CompareInfo.cs: Implemented

	* DateTimeFormatInfo.cs: Fixed the worst of the formatting,
	construct default FullDateTimePattern on the fly.

svn path=/trunk/mcs/; revision=18820
2003-10-09 21:09:57 +00:00
Dick Porter 93aff8c4da 2002-09-12 Dick Porter <[email protected]>
* unix.args: Add System.Globalization.SortKey,
	System.Globalization.StringInfo and
	System.Globalizaton.TextElementEnumerator

2002-09-12  Dick Porter  <[email protected]>

	* ThaiBuddhistCalendar.cs:
	* TextInfo.cs:
	* TaiwanCalendar.cs:
	* RegionInfo.cs:
	* KoreanCalendar.cs:
	* JulianCalendar.cs:
	* JapaneseCalendar.cs:
	* HijriCalendar.cs:
	* HebrewCalendar.cs:
	* GregorianCalendar.cs:
	* CultureInfo.cs:
	* CompareInfo.cs: Stub out missing methods

svn path=/trunk/mcs/; revision=7407
2002-09-12 18:34:38 +00:00
Tim Coleman c60ac16378 2002-08-15 Tim Coleamn <[email protected]>
* CompareInfo.cs:
                Stubbed out some methods.

svn path=/trunk/mcs/; revision=6704
2002-08-17 07:43:15 +00:00
Rodrigo Moya 032e6cb39e 2002-05-07 Rodrigo Moya <[email protected]>
* CompareInfo.cs: new basic stub (compiles on Linux, so I assume
	it does not break the build on windows. Sorry if it does).

svn path=/trunk/mcs/; revision=4386
2002-05-07 19:15:10 +00:00