mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Internal: Add utils::ToCamelCase($sInput) function
This commit is contained in:
@@ -2192,4 +2192,17 @@ class utils
|
|||||||
|
|
||||||
return getenv('username');
|
return getenv('username');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transform a snake_case $sInput into a CamelCase string
|
||||||
|
*
|
||||||
|
* @since 2.7.0
|
||||||
|
* @param string $sInput
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function ToCamelCase($sInput)
|
||||||
|
{
|
||||||
|
return str_replace(' ', '', ucwords(strtr($sInput, '_-', ' ')));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user