Free cookie consent management tool by TermsFeed padleft() Function
padleft() Function

Function

padleft( text, length )

Pads text with spaces on the left so that it is a certain length.

Parameters

Keyword Type Description

text

Text

The text to be padded.

length

Number

The target number of characters desired in the final text.

Returns

Text

Usage considerations

Padding and text length

Spaces will be added until the text has the number of characters entered for the length parameter.

Text longer than the specified length remains untouched.

Examples

padleft("boston",10) returns     boston

Open in Github Built: Fri, Nov 10, 2023 (03:42:48 PM)

padleft() Function

FEEDBACK