summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/String.cs
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2017-02-10 20:35:12 +0900
committerJiyoung Yun <jy910.yun@samsung.com>2017-02-10 20:35:12 +0900
commit4b11dc566a5bbfa1378d6266525c281b028abcc8 (patch)
treeb48831a898906734f8884d08b6e18f1144ee2b82 /src/mscorlib/src/System/String.cs
parentdb20f3f1bb8595633a7e16c8900fd401a453a6b5 (diff)
downloadcoreclr-4b11dc566a5bbfa1378d6266525c281b028abcc8.tar.gz
coreclr-4b11dc566a5bbfa1378d6266525c281b028abcc8.tar.bz2
coreclr-4b11dc566a5bbfa1378d6266525c281b028abcc8.zip
Imported Upstream version 1.0.0.9910upstream/1.0.0.9910
Diffstat (limited to 'src/mscorlib/src/System/String.cs')
-rw-r--r--src/mscorlib/src/System/String.cs19
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
}
}