HEX
Server: nginx/1.26.1
System: Linux main-vm 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
User: root (0)
PHP: 8.2.19
Disabled: NONE
Upload Files
File: /var/www/bellecouture/wp-content/plugins/easy-digital-downloads/src/Utils/Convert.php
<?php
/**
 * Utility class to help convert and reformat data.
 *
 * @since 3.3.3
 * @package EDD\Utils
 */

namespace EDD\Utils;

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;

/**
 * Utility class to help convert and reformat data.
 *
 * @since 3.3.3
 */
class Convert {
	/**
	 * Convert a camel case string to snake case.
	 *
	 * Useful when trying to convert a string into a class name.
	 *
	 * @since 3.3.3
	 *
	 * @param string $input The string to convert.
	 *
	 * @return string
	 */
	public static function snake_to_camel( $input ) {
		$input = str_replace( '-', '_', $input );

		return str_replace( '_', '', ucwords( $input, '_' ) );
	}
}