Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 1.65 KB

README.md

File metadata and controls

36 lines (29 loc) · 1.65 KB

PHP Case Converter

The PHP Case Converter collection helps changing the cases of existing texts.

Usage

<?php
require_once("CaseConverter.php");
$converter = new CaseConverter();

$input = "The quick brown fox jumps over the lazy dog";

$converter->convertToUpperCase($input);   // THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG
$converter->convertToLowerCase($input);   // the quick brown fox jumps over the lazy dog
$converter->convertToStartCase($input);   // The Quick Brown Fox Jumps Over The Lazy Dog
$converter->convertToCamelCase($input);   // TheQuickBrownFoxJumpsOverTheLazyDog
$converter->convertToSnakeCase($input);   // The_Quick_Brown_Fox_Jumps_Over_The_Lazy_Dog
$converter->convertToKebabCase($input);   // the-quick-brown-fox-jumps-over-the-lazy-dog
$converter->convertToStudlyCaps($input);  // THe QUiCk BRoWn FoX JUMps oVeR thE LazY dOG
$converter->invertCase($input);           // tHE QUICK BROWN FOX JUMPS OVER THE LAZY DOG

Online Resources

Get more information and online tools for this implementation on https://en.toolpage.org/cat/case-converter