Click or drag to resize

StringExtensionsAddSpacesBetweenCases Method

[This is preliminary documentation and is subject to change.]

Adds spaces between cases in a string. When toSentence is true, converts it to lowercase too

Namespace:  CSInfrastructure.Extensions
Assembly:  CSInfrastructure (in CSInfrastructure.dll) Version: 1.13.0+Branch.master.Sha.d583fc64569355d188a9c0818d257b6d0d3e1339
Syntax
C#
public static string AddSpacesBetweenCases(
	this string input,
	bool toSentence = false
)

Parameters

input
Type: SystemString
The string to add spaces to
toSentence (Optional)
Type: SystemBoolean
Determines if the string should be changed to a sentence or not

Return Value

Type: String
A string with spaces between the cases

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Examples

"ThisIsAnExampleString" becomes "This Is An Example String" when toSentence is false

"ThisIsAnExampleString" becomes "This is an example string" when toSentence is true

See Also