PHPackages                             jabarihunt/format - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jabarihunt/format

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jabarihunt/format
=================

Class to hold static formatting helper methods.

v1.0.1(6y ago)06MITPHPPHP &gt;=7.1.0

Since Apr 17Pushed 6y ago1 watchersCompare

[ Source](https://github.com/jabarihunt/format)[ Packagist](https://packagist.org/packages/jabarihunt/format)[ Docs](https://github.com/jabarihunt/format)[ RSS](/packages/jabarihunt-format/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Format Class
============

[](#format-class)

This class was developed to hold static formatting helper methods as outlined below...

Getting Started
---------------

[](#getting-started)

### Prerequisites

[](#prerequisites)

- PHP 7.1 or greater (due to type hinting)

### INSTALLING

[](#installing)

#### Via Composer

[](#via-composer)

Run the following command in the same directory as your composer.json file:

`php composer.phar require jabarihunt/format`

#### Via Github

[](#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
-----

[](#usage)

#### name(string $name):

[](#namestring-name)

Credit for the original method goes to [Armand Niculescu](https://www.media-division.com/correct-name-capitalization-in-php/).

This method correctly capitalizes names when there are prefixes &amp; suffixes, apostrophes, name parts that shouldn't be capitalized, and in other scenarios where using something like `ucwords(strtolower($str))` doesn't work.

Examples:

`$name``ucwords(strtolower($name))``Format::name($name)`michael o’carrolMichael O’carrolMichael O’Carrollucas l’amourLucas L’amourLucas l’Amourgeorge d’onofrioGeorge D’onofrioGeorge d’Onofriowilliam stanley iiiWilliam Stanley IiiWilliam Stanley IIIUNITED STATES OF AMERICAUnited States Of AmericaUnited States of Americat. von lieres und wilkauT. Von Lieres Und WilkauT. von Lieres und Wilkaupaul van der knaapPaul Van Der KnaapPaul van der Knaapjean-luc picardJean-luc PicardJean-Luc PicardJOHN MCLARENJohn MclarenJohn McLarenhENRIC vIIIHenric ViiiHenric VIIIVAsco da GAmaVasco Da GamaVasco da GamaCONTRIBUTING
------------

[](#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
-------

[](#license)

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

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2221d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2807764?v=4)[Jabari J. Hunt](/maintainers/jabarihunt)[@jabarihunt](https://github.com/jabarihunt)

---

Top Contributors

[![jabarihunt](https://avatars.githubusercontent.com/u/2807764?v=4)](https://github.com/jabarihunt "jabarihunt (3 commits)")

---

Tags

formatname

### Embed Badge

![Health badge](/badges/jabarihunt-format/health.svg)

```
[![Health](https://phpackages.com/badges/jabarihunt-format/health.svg)](https://phpackages.com/packages/jabarihunt-format)
```

###  Alternatives

[willdurand/negotiation

Content Negotiation tools for PHP provided as a standalone library.

1.4k122.0M157](/packages/willdurand-negotiation)[akaunting/laravel-money

Currency formatting and conversion package for Laravel

7825.3M18](/packages/akaunting-laravel-money)[gabrielelana/byte-units

Library to parse, format and convert byte units

1672.2M19](/packages/gabrielelana-byte-units)[gajus/dindent

HTML indentation library for development and testing.

1781.9M50](/packages/gajus-dindent)[consistence/consistence

Consistence - consistent approach and additions to PHP's functionality

1831.1M18](/packages/consistence-consistence)[kartik-v/yii2-datecontrol

Date control module allowing separation of formats for View and Model for Yii Framework 2.0

551.5M36](/packages/kartik-v-yii2-datecontrol)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
