center


Description:

public static string center (string? s, int width, char pad)

Center the string within the specified width using the pad character.

Example:

    assert (Strings.center ("hi", 6, '*') == "**hi**");

Parameters:

s

the string to center.

width

the desired total width.

pad

the padding character.

Returns:

centered string.