Module

x/lodash_es/src/string.js>pad

lodash for deno use
Latest
function pad
import { pad } from "https://dotland.deno.dev/x/lodash_es@v0.0.2/src/string.js";

Pads string on the left and right sides if it's shorter than length. Padding characters are truncated if they can't be evenly divided by length.

Examples

_.pad('abc', 8); // => ' abc '

.pad('abc', 8, '-'); // => '-abc-_'

_.pad('abc', 3); // => 'abc'

Parameters

string
length
chars