AB#5822 Clean up

This commit is contained in:
Bjarke Berg
2020-03-31 16:28:13 +02:00
parent 94f4c6b372
commit c75c86ab27
4 changed files with 13 additions and 12 deletions

View File

@@ -947,7 +947,9 @@ namespace Umbraco.Core
/// <returns>The filtered string.</returns>
public static string ReplaceFirst(this string text, string search, string replace)
{
var pos = text.IndexOf(search);
if (text == null) throw new ArgumentNullException(nameof(text));
var pos = text.IndexOf(search, StringComparison.InvariantCulture);
if (pos < 0)
return text;