1
0
mirror of https://github.com/danielstjules/Stringy.git synced 2025-09-02 17:42:58 +02:00
This commit is contained in:
Daniel St. Jules
2013-07-16 00:04:32 -04:00
parent ace2dee61b
commit c1bfe35f57
3 changed files with 117 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ A PHP library with a variety of string manipulation functions with multibyte sup
* [tidy](#tidy)
* [clean](#clean)
* [standardize](#standardize)
* [pad](#pad)
* [Tests](#tests)
* [License](#license)
@@ -189,6 +190,19 @@ Converts some non-ASCII characters to their closest ASCII counterparts.
S::standardize('fòô bàř'); // 'foo bar'
```
##### pad
S::pad(string $str , int $length [, string $padStr [, string $padType [, string $encoding]]])
Pads a string to a given length with another string. If length is less
than or equal to the length of $str, then no padding takes places. The
default string used for padding is a space, and the default type (one of
'left', 'right', 'both') is 'right'.
```php
S::pad('fòô bàř', 10, '¬ø', 'left', 'UTF-8'); // '¬ø¬fòô bàř'
```
## TODO
**center**