diff --git a/src/mscorlib/shared/System/MemoryExtensions.Fast.cs b/src/mscorlib/shared/System/MemoryExtensions.Fast.cs index d9e3af880482..d256887a9f7e 100644 --- a/src/mscorlib/shared/System/MemoryExtensions.Fast.cs +++ b/src/mscorlib/shared/System/MemoryExtensions.Fast.cs @@ -359,6 +359,7 @@ public static bool StartsWith(this ReadOnlySpan span, ReadOnlySpan v /// /// Creates a new span over the portion of the target array. /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Span AsSpan(this T[] array, int start) { if (array == null) @@ -380,6 +381,7 @@ public static Span AsSpan(this T[] array, int start) /// /// The target string. /// Returns default when is null. + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ReadOnlySpan AsSpan(this string text) { if (text == null) @@ -397,6 +399,7 @@ public static ReadOnlySpan AsSpan(this string text) /// /// Thrown when the specified index is not in range (<0 or >text.Length). /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ReadOnlySpan AsSpan(this string text, int start) { if (text == null) @@ -422,6 +425,7 @@ public static ReadOnlySpan AsSpan(this string text, int start) /// /// Thrown when the specified index or is not in range. /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ReadOnlySpan AsSpan(this string text, int start, int length) { if (text == null) diff --git a/src/mscorlib/shared/System/MemoryExtensions.cs b/src/mscorlib/shared/System/MemoryExtensions.cs index 1a3b33acc701..c3e1cd51fa44 100644 --- a/src/mscorlib/shared/System/MemoryExtensions.cs +++ b/src/mscorlib/shared/System/MemoryExtensions.cs @@ -68,7 +68,6 @@ public static ReadOnlySpan TrimEnd(this ReadOnlySpan span) /// /// The source span from which the character is removed. /// The specified character to look for and remove. - //[MethodImpl(MethodImplOptions.AggressiveInlining)] public static ReadOnlySpan Trim(this ReadOnlySpan span, char trimChar) { return span.TrimStart(trimChar).TrimEnd(trimChar); @@ -79,7 +78,6 @@ public static ReadOnlySpan Trim(this ReadOnlySpan span, char trimCha /// /// The source span from which the character is removed. /// The specified character to look for and remove. - //[MethodImpl(MethodImplOptions.AggressiveInlining)] public static ReadOnlySpan TrimStart(this ReadOnlySpan span, char trimChar) { int start = 0; @@ -1204,7 +1202,7 @@ ref MemoryMarshal.GetReference(span), /// no larger element, the bitwise complement of . /// /// - /// is . + /// is . /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int BinarySearch( @@ -1228,7 +1226,7 @@ public static int BinarySearch( /// no larger element, the bitwise complement of . /// /// - /// is . + /// is . /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int BinarySearch( @@ -1278,7 +1276,7 @@ public static int BinarySearch( /// no larger element, the bitwise complement of . /// /// - /// is . + /// is . /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int BinarySearch( @@ -1302,7 +1300,7 @@ public static int BinarySearch( /// no larger element, the bitwise complement of . /// /// - /// is . + /// is . /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int BinarySearch( diff --git a/src/mscorlib/shared/System/String.cs b/src/mscorlib/shared/System/String.cs index a1251d6be0e9..42d21ba06870 100644 --- a/src/mscorlib/shared/System/String.cs +++ b/src/mscorlib/shared/System/String.cs @@ -360,6 +360,7 @@ public static string Create(int length, TState state, SpanAction(string value) => value != null ? new ReadOnlySpan(ref value.GetRawStringData(), value.Length) : default;