Centre, left-justify or right-justify a stringΒΆ

centre(), center()

Centre a string within its field width

left()

Left-justify a string

right()

Right-justify a string


SYNTAX

centre | center(text_expression)

left(text_expression)

right(text_expression)

centre and center are alternative names for the same function. It centres text_expression by padding it with spaces within its field width. It returns the centred text and all padding spaces; thus the string returned is always the same length as the string sent.

The left function left-justifies a text expression within its field width. The text returned is of the same length as text_expression, but with any leading spaces moved to the end.

The right function right-justifies a text expression within its field width. The text returned is of the same length as text_expression, but with any leading spaces moved to the beginning.


RELATED TOPICS

String handling functions