C# Class TabMon.StringExtensions

Extension methods for the System.String class.
Mostra file Open project: tableau/TabMon

Public Methods

Method Description
JoinIfNotNull ( this baseString, string separator ) : string

Joins multiple strings together with a delimiter. If a string segment is null, it will not be appended.

Pluralize ( this str, int count ) : string

Pluralizes a string.

ToSnakeCase ( this str ) : string

Converts a string to the snake case (lowercase with underscores instead of spaces).

Method Details

JoinIfNotNull() public static method

Joins multiple strings together with a delimiter. If a string segment is null, it will not be appended.
public static JoinIfNotNull ( this baseString, string separator ) : string
baseString this
separator string
return string

Pluralize() public static method

Pluralizes a string.
public static Pluralize ( this str, int count ) : string
str this The string to pluralize.
count int The quantity used to pluralize.
return string

ToSnakeCase() public static method

Converts a string to the snake case (lowercase with underscores instead of spaces).
public static ToSnakeCase ( this str ) : string
str this A string that is Camel Case or Pluralized.
return string