Table of Contents

Class ConvertPascalConvention

Namespace
SunamoConverters.Converts
Assembly
SunamoConverters.dll

Converts text to and from Pascal case convention (EachWordStartsWithCapital).

public class ConvertPascalConvention
Inheritance
ConvertPascalConvention
Inherited Members
Extension Methods

Methods

FromConvention(string)

Converts text from Pascal case to separate words.

public static string FromConvention(string text)

Parameters

text string

The Pascal case text to convert.

Returns

string

The text with words separated by spaces.

IsPascal(string)

Checks if the text is in Pascal case format.

public static bool IsPascal(string text)

Parameters

text string

The text to check.

Returns

bool

True if the text is in Pascal case, false otherwise.

ToConvention(string)

Converts text to Pascal case convention (includes numbers). Examples:

  • "hello world" → "HelloWorld"
  • "Hello world" → "HelloWorld"
  • "helloWorld" → "HelloWorld"
public static string ToConvention(string text)

Parameters

text string

The text to convert.

Returns

string

The text converted to Pascal case.