diff options
| author | Bond_009 <bond.009@outlook.com> | 2019-10-11 18:22:29 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2019-10-11 18:32:13 +0200 |
| commit | 516933aab58eb668d8db20307cd25d6532bd198c (patch) | |
| tree | dcde956a2181777ab7fc97a23f6879750d22607c /Emby.Naming/Extensions/StringExtensions.cs | |
| parent | d64b43286ecf9418280d5a782826182cc2ef98e4 (diff) | |
Move to netcore3.0
Diffstat (limited to 'Emby.Naming/Extensions/StringExtensions.cs')
| -rw-r--r-- | Emby.Naming/Extensions/StringExtensions.cs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/Emby.Naming/Extensions/StringExtensions.cs b/Emby.Naming/Extensions/StringExtensions.cs deleted file mode 100644 index 5512127a8..000000000 --- a/Emby.Naming/Extensions/StringExtensions.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Text; - -namespace Emby.Naming.Extensions -{ - public static class StringExtensions - { - // TODO: @bond remove this when moving to netstandard2.1 - public static string Replace(this string str, string oldValue, string newValue, StringComparison comparison) - { - var sb = new StringBuilder(); - - var previousIndex = 0; - var index = str.IndexOf(oldValue, comparison); - - while (index != -1) - { - sb.Append(str.Substring(previousIndex, index - previousIndex)); - sb.Append(newValue); - index += oldValue.Length; - - previousIndex = index; - index = str.IndexOf(oldValue, index, comparison); - } - - sb.Append(str.Substring(previousIndex)); - - return sb.ToString(); - } - } -} |
