diff --git a/src/client/spark_core/utils/StringExtensions.cs b/src/client/spark_core/utils/StringExtensions.cs index 5b3d33a5e..7d094aa6b 100644 --- a/src/client/spark_core/utils/StringExtensions.cs +++ b/src/client/spark_core/utils/StringExtensions.cs @@ -1,39 +1,42 @@ -namespace bts.utils { - using System; - using System.Collections.Generic; - using System.Diagnostics.Contracts; - using System.Linq; - - static class StringExtensions { - [Pure] - public static string EmptyIfNull(this string str) => - str ?? ""; - - [Pure] - public static string NullIfEmpty(this string str) => - str == "" ? null : str; - - [Pure] - public static bool IsNullOrEmpty(this string str) => - string.IsNullOrEmpty(str); - - public static bool is_null_or_white_space(this string str) => - string.IsNullOrWhiteSpace(str); - - public static bool SafeContains(this string str, string value) => - str != null && str.Contains(value); - - public static string join(this string str, IEnumerable values) => - string.Join(str, values); - - public static string join(this string str, IEnumerable values) => - string.Join(str, values.Select(v => v.ToString())); - - public static string join( - this string str, - IEnumerable values, - string format, - IFormatProvider format_provider = null) where T : IFormattable => - string.Join(str, values.Select(v => v.ToString(format, format_provider))); - } -} +namespace bts.utils { + using System; + using System.Collections.Generic; + using System.Diagnostics.Contracts; + using System.Linq; + + static class StringExtensions { + [Pure] + public static string EmptyIfNull(this string str) => + str ?? ""; + + [Pure] + public static string NullIfEmpty(this string str) => + str == "" ? null : str; + + [Pure] + public static bool IsNullOrEmpty(this string str) => + string.IsNullOrEmpty(str); + + public static bool is_null_or_white_space(this string str) => + string.IsNullOrWhiteSpace(str); + + public static bool SafeContains(this string str, string value) => + str != null && str.Contains(value); + + public static string join(this string str, IEnumerable values) => + string.Join(str, values); + + public static string join(this string str, IEnumerable values) => + string.Join(str, values); + + public static string join(this string str, IEnumerable values) => + string.Join(str, values.Select(v => v.ToString())); + + public static string join( + this string str, + IEnumerable values, + string format, + IFormatProvider format_provider = null) where T : IFormattable => + string.Join(str, values.Select(v => v.ToString(format, format_provider))); + } +}