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

This website is brand new and built with the Odin 2.1 beta in mind. This means you might discover some features such as attribute expressions that are only available in the beta.

You can download the 2.1 beta from here and read the patch-notes here.