diff options
| author | Vasily <JustAMan@users.noreply.github.com> | 2019-10-15 15:35:37 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-15 15:35:37 +0300 |
| commit | 0ccbc2f37444d7deb7981a1e6ac2fafc1a518750 (patch) | |
| tree | 51c34ea3b45e913998f3cb4d1510030cf4f52d3b /Emby.Naming/Extensions/StringExtensions.cs | |
| parent | c9851db4c713db3a5fa2076dc0fb5b5be72b5989 (diff) | |
| parent | 516933aab58eb668d8db20307cd25d6532bd198c (diff) | |
Merge pull request #1884 from Bond-009/netcore3.0
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(); - } - } -} |
