TheStachelfisch_Discord-Link-Fixer-Bot/LinkFixerBot/StringExtension.cs
using System;

namespace LinkFixerBot
{
    public static class StringExtensionMethods
    {
        public static string ReplaceFirst(this string text, string search, string replace)
        {
            int pos = text.IndexOf(search, StringComparison.Ordinal);
            if (pos < 0)
            {
                return text;
            }
            return text.Substring(0, pos) + replace + text.Substring(pos + search.Length);
        }
    }
}