New: Backend changes for new UI

This commit is contained in:
Qstick
2018-11-23 02:03:32 -05:00
parent e9eebd3ce6
commit 65efa15551
485 changed files with 11177 additions and 2233 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
@@ -8,6 +9,8 @@ namespace NzbDrone.Common.Extensions
{
public static class StringExtensions
{
private static readonly Regex CamelCaseRegex = new Regex("(?<!^)[A-Z]", RegexOptions.Compiled);
public static string NullSafe(this string target)
{
return ((object)target).NullSafe().ToString();
@@ -62,6 +65,10 @@ namespace NzbDrone.Common.Extensions
return text;
}
public static string Join(this IEnumerable<string> values, string separator)
{
return string.Join(separator, values);
}
public static string CleanSpaces(this string text)
{
@@ -132,5 +139,10 @@ namespace NzbDrone.Common.Extensions
return Encoding.ASCII.GetString(new [] { byteResult });
}
public static string SplitCamelCase(this string input)
{
return CamelCaseRegex.Replace(input, match => " " + match.Value);
}
}
}