mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-30 05:45:31 +02:00
New: Backend changes for new UI
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user