<PackageReference Include="Newtonsoft.Json" Version="4.0.2" />

StringUtils

static class StringUtils
public const char CarriageReturn = '\r'

public const string CarriageReturnLineFeed = "\r\n"

public const string Empty = ""

public const char LineFeed = '\n'

public const char Tab = '\t'

public static bool ContainsWhiteSpace(string s)

Determines whether the string contains white space.

public static StringWriter CreateStringWriter(int capacity)

public static string EnsureEndsWith(string target, string value)

Ensures the target string ends with the specified string.

public static TSource ForgivingCaseSensitiveFind<TSource>(this IEnumerable<TSource> source, Func<TSource, string> valueSelector, string testValue)

public static string FormatWith(this string format, IFormatProvider provider, object[] args)

public static int? GetLength(string value)

public static void IfNotNullOrEmpty(string value, Action<string> action)

Perform an action if the string is not null or empty.

public static string Indent(string s, int indentation)

Indents the specified string.

public static string Indent(string s, int indentation, char indentChar)

Indents the specified string.

public static bool IsNullOrEmptyOrWhiteSpace(string s)

public static bool IsWhiteSpace(string s)

Determines whether the string is all white space. Empty string will return false.

public static string NullEmptyString(string s)

Nulls an empty string.

public static string NumberLines(string s)

Numbers the lines.

public static string ReplaceNewLines(string s, string replacement)

public static string ToCamelCase(string s)

public static string ToCharAsUnicode(char c)

public static string Truncate(string s, int maximumLength)

public static string Truncate(string s, int maximumLength, string suffix)

public static void WriteCharAsUnicode(TextWriter writer, char c)