 | ExtensionMethodskPadCenter Method |
Pads the center of a string.
Namespace:
Koden.Utils.Extensions
Assembly:
Koden.Utils (in Koden.Utils.dll) Version: 1.1.6453.26060
Syntaxpublic static string kPadCenter(
this string s,
int width,
char c
)
<ExtensionAttribute>
Public Shared Function kPadCenter (
s As String,
width As Integer,
c As Char
) As String
public:
[ExtensionAttribute]
static String^ kPadCenter(
String^ s,
int width,
wchar_t c
)
[<ExtensionAttribute>]
static member kPadCenter :
s : string *
width : int *
c : char -> string
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:
StringString 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