zhukmax/stringpad

Lib for add symbols to start or end of string like spaces, dots or any another.

1.1.0 2019-11-01 13:31 UTC

This package is auto-updated.

Last update: 2024-04-20 22:57:01 UTC


README

Software License Total Downloads

Lib for add symbols to start or end of string like spaces, dots or any another.

Install

composer require zhukmax/stringpad

Usage

<?php

require_once 'vendor/autoload.php';
use Zhukmax\StringPad;

echo StringPad::left(5, 6, 0); // => 000005
echo StringPad::right('b', 5, 'a'); // => baaaa