jabarihunt/format

Class to hold static formatting helper methods.

v1.0.1 2020-04-17 18:54 UTC

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

  1. Clone this repository into a working directory: git clone git@github.com:jabarihunt/format
  2. 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

  1. Fork Repository
  2. Create a descriptive branch name
  3. Make edits to your branch
  4. Squash (rebase) your commits
  5. Create a pull request

LICENSE

This project is licensed under the MIT License - see the LICENSE.md file for details.