Returns a string that centers the given text using placeholder
Optional
the text to inspect
the max width of the expected string
the placeholder to pad
a string that centers the given text using placeholder
center('foobar', -1); // 'foobar'center('foobar', 0); // ''center('foobar', 3); // 'foobar'center('foobar', 7); // 'foobar 'center('foobar', 10); // ' foobar ' Copy
center('foobar', -1); // 'foobar'center('foobar', 0); // ''center('foobar', 3); // 'foobar'center('foobar', 7); // 'foobar 'center('foobar', 10); // ' foobar '
Returns a string that centers the given text using placeholder