jabarihunt / format
Class to hold static formatting helper methods.
v1.0.1
2020-04-17 18:54 UTC
Requires
- php: >=7.1.0
This package is auto-updated.
Last update: 2024-09-18 04:31:32 UTC
README
This class was developed to hold static formatting helper methods as outlined below...
Getting Started
Prerequisites
- PHP 7.1 or greater (due to type hinting)
INSTALLING
Via Composer
Run the following command in the same directory as your composer.json file:
php composer.phar require jabarihunt/format
Via Github
- Clone this repository into a working directory:
git clone git@github.com:jabarihunt/format
- Include the Format class in your project...
require('/path/to/Format.php')
...or if using an auto-loader...
use jabarihunt/Format
USAGE
name(string $name):
Credit for the original method goes to Armand Niculescu.
This method correctly capitalizes names when there are prefixes & suffixes, apostrophes, name parts that shouldn't be capitalized, and in other scenarios where using something like ucwords(strtolower($str))
doesn't work.
Examples:
CONTRIBUTING
- Fork Repository
- Create a descriptive branch name
- Make edits to your branch
- Squash (rebase) your commits
- Create a pull request
LICENSE
This project is licensed under the MIT License - see the LICENSE.md file for details.