PHPackages                             vorgas/proper-naming - 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. vorgas/proper-naming

ActiveLibrary

vorgas/proper-naming
====================

Tools for correcting capitalization on various proper names

117[1 issues](https://github.com/vorgas/proper-naming/issues)PHP

Since Aug 13Pushed 2y ago1 watchersCompare

[ Source](https://github.com/vorgas/proper-naming)[ Packagist](https://packagist.org/packages/vorgas/proper-naming)[ RSS](/packages/vorgas-proper-naming/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Proper Naming
=============

[](#proper-naming)

An advanced and extensible proper name casing strategy

Turns MIKE HILL into Mike Hill, and ANGUS MACGUYVER into Angus MacGuyver. And if somebody types in John MacDonald and Ian Macloud, it figures they know what they are doing, and leaves the capitalization the way it was submitted.

With proper usage, it will not only turn angel d'arcy into Angel D'Arcy but knows to leave well enough alone and make HELL'S BELLS into Hell's Bells.

Features At A Glance
--------------------

[](#features-at-a-glance)

- Different strategies for people and places
- Adjustable in real time through public properties
- Force words to all upper or all lower case
- Detect properly formatted overrides on edge cases
- Callable objects for cleaner code

Installation
------------

[](#installation)

From within your project...

```
# composer require vorgas/proper-naming:dev-main
```

Basic Usage
-----------

[](#basic-usage)

Just call the appropriate class with the string to case.

```
use ProperNaming\PeopleCasing;
$ProperName = new PeopleCasing();
$ProperName('MIKE HILL'); # Mike Hill
$ProperName('rip van winkle'); # Rip van Winkle
$ProperName('van trapp'); # Van Trapp
