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-12-21 00:21:36 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