diff options
Diffstat (limited to 'src/mscorlib/src/System/String.cs')
-rw-r--r-- | src/mscorlib/src/System/String.cs | 19 |
1 files changed, 2 insertions, 17 deletions
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<String>, IEnumerable<char>, IEquatable<String> @@ -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<CharEnumerator>() != null); @@ -842,10 +829,8 @@ namespace System { } } -#if FEATURE_SPAN_OF_T internal ref char GetFirstCharRef() { return ref m_firstChar; } -#endif } } |