StringExtensionsWordWrap(String, Int32, Boolean) Method

Wraps the input text into multiple lines whose words will fit into the specified line length.

Definition

Namespace: DevCase.Extensions.StringExtensions
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static string WordWrap(
	string input,
	int maxLength,
	bool breakWords
)

Parameters

input  String
The input text.
maxLength  Int32
The maximum length of each line.
breakWords  Boolean
If True, break into multiple chunks the last word that does not fit in the end of the line, ensuring this way that all the lines fills up to the specified maxLength line length.

Return Value

String
The resulting word-wrapped string.

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also