From 4b11dc566a5bbfa1378d6266525c281b028abcc8 Mon Sep 17 00:00:00 2001 From: Jiyoung Yun Date: Fri, 10 Feb 2017 20:35:12 +0900 Subject: Imported Upstream version 1.0.0.9910 --- src/mscorlib/src/System/String.cs | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'src/mscorlib/src/System/String.cs') diff --git a/src/mscorlib/src/System/String.cs b/src/mscorlib/src/System/String.cs index f9162ff528..175e396633 100644 --- a/src/mscorlib/src/System/String.cs +++ b/src/mscorlib/src/System/String.cs @@ -37,7 +37,6 @@ namespace System { // implemented as a part of String. As with arrays, character positions // (indices) are zero-based. - [ComVisible(true)] [Serializable] public sealed partial class String : IComparable, ICloneable, IConvertible, IEnumerable , IComparable, IEnumerable, IEquatable @@ -331,18 +330,12 @@ namespace System { // These just wrap calls to Normalization class public bool IsNormalized() { -#if !FEATURE_NORM_IDNA_ONLY // Default to Form C return IsNormalized(NormalizationForm.FormC); -#else - // Default to Form IDNA - return IsNormalized((NormalizationForm)ExtendedNormalizationForms.FormIdna); -#endif } public bool IsNormalized(NormalizationForm normalizationForm) { -#if !FEATURE_NORM_IDNA_ONLY if (this.IsFastSort()) { // If its FastSort && one of the 4 main forms, then its already normalized @@ -352,24 +345,17 @@ namespace System { normalizationForm == NormalizationForm.FormKD ) return true; } -#endif // !FEATURE_NORM_IDNA_ONLY return Normalization.IsNormalized(this, normalizationForm); } public String Normalize() { -#if !FEATURE_NORM_IDNA_ONLY // Default to Form C return Normalize(NormalizationForm.FormC); -#else - // Default to Form IDNA - return Normalize((NormalizationForm)ExtendedNormalizationForms.FormIdna); -#endif } public String Normalize(NormalizationForm normalizationForm) { -#if !FEATURE_NORM_IDNA_ONLY if (this.IsAscii()) { // If its FastSort && one of the 4 main forms, then its already normalized @@ -379,7 +365,6 @@ namespace System { normalizationForm == NormalizationForm.FormKD ) return this; } -#endif // !FEATURE_NORM_IDNA_ONLY return Normalization.Normalize(this, normalizationForm); } @@ -801,12 +786,14 @@ namespace System { [MethodImplAttribute(MethodImplOptions.InternalCall)] internal extern bool IsAscii(); +#if FEATURE_COMINTEROP // Set extra byte for odd-sized strings that came from interop as BSTR. [MethodImplAttribute(MethodImplOptions.InternalCall)] internal extern void SetTrailByte(byte data); // Try to retrieve the extra byte - returns false if not present. [MethodImplAttribute(MethodImplOptions.InternalCall)] internal extern bool TryGetTrailByte(out byte data); +#endif public CharEnumerator GetEnumerator() { Contract.Ensures(Contract.Result() != null); @@ -842,10 +829,8 @@ namespace System { } } -#if FEATURE_SPAN_OF_T internal ref char GetFirstCharRef() { return ref m_firstChar; } -#endif } } -- cgit v1.2.3