Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/Polyfill/Polyfill_StringBuilder_Insert.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// <auto-generated />
#pragma warning disable

namespace Polyfills;

using System;
using System.Text;

static partial class Polyfill
{
#if (!NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_0) && FeatureMemory
/// <summary>
/// Inserts the sequence of characters into this instance at the specified character position.
/// </summary>
/// <param name="index">The position in this instance where insertion begins.</param>
/// <param name="value">The character span to insert.</param>
/// <returns>A reference to this instance after the insert operation has completed.</returns>
//Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.insert#system-text-stringbuilder-insert(system-int32-system-readonlyspan((system-char)))
public static StringBuilder Insert(this StringBuilder target, int index, ReadOnlySpan<char> value) =>
target.Insert(index, value.ToString());
#endif
}