Click or drag to resize

ExtensionMethodskPadCenter Method

Pads the center of a string.

Namespace:  Koden.Utils.Extensions
Assembly:  Koden.Utils (in Koden.Utils.dll) Version: 1.1.6453.26060
Syntax
public static string kPadCenter(
	this string s,
	int width,
	char c
)

Parameters

s
Type: SystemString
The sring for the center.
width
Type: SystemInt32
The total width of final string.
c
Type: SystemChar
The character to pad with.

Return Value

Type: String
String with center padded to max width

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