diff options
| author | Bond-009 <bond.009@outlook.com> | 2019-05-10 20:37:42 +0200 |
|---|---|---|
| committer | Bond-009 <bond.009@outlook.com> | 2019-06-01 11:31:27 +0200 |
| commit | a6f9ceedd82fe34a8d1f088d91f7c217ee070aad (patch) | |
| tree | 9774be96290a3bf52d7a8fd4efc3314e9f7695a6 /Emby.Naming/StringExtensions.cs | |
| parent | 2aed2d164b110ecafa88b5036e0875627908bde2 (diff) | |
Fix more warnings
Diffstat (limited to 'Emby.Naming/StringExtensions.cs')
| -rw-r--r-- | Emby.Naming/StringExtensions.cs | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/Emby.Naming/StringExtensions.cs b/Emby.Naming/StringExtensions.cs deleted file mode 100644 index 7c61922af..000000000 --- a/Emby.Naming/StringExtensions.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Text; - -namespace Emby.Naming -{ - internal static class StringExtensions - { - 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(); - } - } -} |
