diff --git a/src/Illuminate/Support/Str.php b/src/Illuminate/Support/Str.php index 0d706d1920ca..a4e14666587e 100644 --- a/src/Illuminate/Support/Str.php +++ b/src/Illuminate/Support/Str.php @@ -284,6 +284,19 @@ public static function containsAll($haystack, $needles, $ignoreCase = false) return true; } + /** + * Convert the case of a string. + * + * @param string $string + * @param int $mode + * @param string $encoding + * @return string + */ + public static function convertCase(string $string, int $mode = MB_CASE_FOLD, ?string $encoding = 'UTF-8') + { + return mb_convert_case($string, $mode, $encoding); + } + /** * Determine if a given string ends with a given substring. *