Skip to content

Feature: padLeft / lpad  #113

@AngelGzS

Description

@AngelGzS

Pads the input text from left to a new length.

padLeft ('Foo Bar', 1); // => 'Foo Bar'
padLeft ('Foo Bar', 8); // => ' Foo Bar'
padLeft ('Foo Bar', 8, '*'); // => '*Foo Bar'
padLeft ('Foo Bar', 10, '*'); // => '***Foo Bar'
padLeft ('Foo Bar', 10, '123'); // => '123Foo Bar'
padLeft ('Foo Bar', 9, '123'); // => '12Foo Bar'

Aliases

import padLeft from '@plexis/pad-left';
import {padLeft, lpad} from 'plexis';

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions