StringExtensionsSplitWords Method

Splits a string in to words.

Definition

Namespace: DotMake.CommandLine
Assembly: DotMake.CommandLine (in DotMake.CommandLine.dll) Version: 2.5.0
C#
public static string[] SplitWords(
	this string value,
	bool keepSpaces = false
)

Parameters

value  String
A string instance.
keepSpaces  Boolean  (Optional)
Whether to keep a single space between words if there were any whitespace or punctuation in the original.

Return Value

String
An array of strings.

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).

See Also