diff options
| author | Anthony Lavado <anthonylavado@users.noreply.github.com> | 2019-06-05 01:17:21 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-05 01:17:21 -0400 |
| commit | aee33608417533c6335f97b32aff40ceadda1758 (patch) | |
| tree | 489d07d11c978ea3066407788084a60177c5baeb /Emby.Naming/StringExtensions.cs | |
| parent | 256f44a87029577ed5daa7646c68e8a395e19708 (diff) | |
| parent | 08ac5b6ec3ce829c6691f1751e86480ace3d4b93 (diff) | |
Merge pull request #1366 from Bond-009/warn3
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(); - } - } -} |
