<PackageReference Include="Relativity.Server.Utility.SDK" Version="5000.2.1" />

kCura.Utility.Strings

public class Strings
Provides static methods for manipulating instance of String.

Compares strings.

public Strings()

public static string AddSpacesToString(string str, int interval)

Inserts new line characters within a string at the specified character interval.

public static string BuildBulletedList<T>(List<T> objs)

Gets a string representing an HTML bulleted list of the provided objects.

public static string EnsureStringEndsWithSingleBackslash(string s)

Ensures the provided string ends with a backslash.

public static string FormatedTimeSpan(TimeSpan timespan)

Gets a formatted string representation of the provided TimeSpan.

public static string GetHashStringFromHashBytes(byte[] inputBytes)

Gets the hash string associated with the provided array of bytes.

public static string InsertSpaces(string s)

Replaces capitilized letters with " $0", trimming the result.

public static bool IntelligentEquals(string str1, string str2)

Indicates whether or not the two provided strings are equal.

public static bool IntelligentEquals(string str1, string str2, StringComparison culture)

Indicates whether or not the two provided strings are equal.

public static bool LikeOperator(string first, string second)

Indicates if the two strings are Like one another.

Reference: https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/operators/like-operator

public static string[] Map(string[] ar, Func<string, string> func)

Projects the values of the array to a new form using the provided delegate.

public static Tuple<string, string> ParseErrorMessageForDisplay(string errorMessage)

Breaks a string representation of an error into a tuple, replacing new line characters with in the second value.

public static Tuple<string, string> ParseErrorMessageForDisplay(string errorMessage, bool replaceNewlines)

Breaks a string representation of an error into a tuple, optionally replacing new line characters with in the second value.

public static string ReplaceMultipleSpacesWithNBSPs(string input)

Replaces doubled spaces with non-breaking spaces.

public static IEnumerable<string> Split(string str, int length)

Splits a string.

public static string[] SplitCsvString(string input)

Splits the specified string into elements according to the rules of comma separated files.

public static IEnumerable<string> SplitWithMessage(string str, int length, string message)

Splits a string, appending the provided message to each chunk.

public static string ToCsvCellContents(string input)

Converts the input to string to is CSV cell content representation.

public static string ToDelimitedFileCellContents(string input, string bound, string newLineProxy)

Replaces system new line characters with the provided new line proxy; doubles any existing bound strings in the input.

public static string TrimAndReduceSpaces(string input)

Removes leading and trailing white-space and normalizes and extra spaces to a single space.

public static string TrimIfQuoted(string input)

Trims the input string of surrounding quotation marks if there are any. Trims only a single set of quotation marks.

public static string TruncateWithSuffix(string input, int length, string suffix)

Truncates the input string to be the length provided. Will add suffix the string with given suffix if string is shorter than the given length