Files
Spacetraders/lib/functions.php
2026-02-11 19:14:48 -06:00

21 lines
530 B
PHP

<?php
/**
* Spacetraders utility functions.
*
* @package SpacetradersAPI
* @author Keith Solomon <keith@keithsolomon.net>
* @license MIT License
* @version GIT: <git_id>
* @link https://git.keithsolomon.net/keith/Spacetraders
*/
/**
* Formats a string by replacing underscores with spaces and capitalizing the first letter.
*
* @param string $str The string to format.
* @return string The formatted string.
*/
function formatString( $str ) {
return ucfirst( strtolower( str_replace( '_', ' ', $str ) ) );
}