Skip to main content

rjust

Right-align the value in a field of a given width.

def rjust(
value: string,
arg: integer
) - > string

Right-align the value in a field of a given width.

Parameters

NameTypeDescription
valuestringThe string value to be right-aligned.
argintegerThe total width of the resulting field, including the original string and leading padding.

Returns

TypeDescription
stringThe original string padded with leading spaces to reach the specified total width.