Extensions..::..PadCenter Method

Pads a string in both directions to center the original

Namespace:  AngbandOS.Core
Assembly:  AngbandOS.Core (in AngbandOS.Core.dll)

Syntax


public static string PadCenter(
	this string source,
	int totalWidth,
	char paddingChar
)

Parameters

source
Type: String
The original string
totalWidth
Type: Int32
The total width of the padded string
paddingChar
Type: Char
The character with which to pad the string

Return Value

The padded string