Version 2.1.0.0

StringExtensions class

Namespace: Sirenix.Utilities
Assembly: Sirenix.Utilities
public static class StringExtensions
String method extensions.
Inheritance
  • System.Object
  • StringExtensions

Methods

Contains(String, String, StringComparison)
Returns whether or not the specified string is contained with this string
public static bool Contains(this string source, string toCheck, StringComparison comparisonType)
Parameters
System.String source

System.String toCheck

System.StringComparison comparisonType

Returns
System.Boolean

IsNullOrWhitespace(String)
Returns true if this string is null, empty, or contains only whitespace.
public static bool IsNullOrWhitespace(this string str)
Parameters
System.String str

The string to check.

Returns
System.Boolean

true if this string is null, empty, or contains only whitespace; otherwise, false.

SplitPascalCase(String)
Ex: "thisIsCamelCase" -> "This Is Camel Case"
public static string SplitPascalCase(this string input)
Parameters
System.String input

Returns
System.String

ToTitleCase(String)
Eg MY_INT_VALUE => MyIntValue
public static string ToTitleCase(this string input)
Parameters
System.String input

Returns
System.String