original_string: public static function change_case($st, $case = 'x'): string
    {
      $st = self::cast($st);
      $case = substr(strtolower((string)$case), 0, 1);
      switch ( $case ){
        case "l":
          $case = MB_CASE_LOWER;
          break;
        case "u":
          $case = MB_CASE_UPPER;
          break;
        default:
          $case = MB_CASE_TITLE;
      }
      if ( !empty($st) ){
        $st = mb_convert_case($st, $case);
      }
      return $st;
    }
code: public static function change_case($st, $case = 'x'): string
    {
      $st = self::cast($st);
      $case = substr(strtolower((string)$case), 0, 1);
      switch ( $case ){
        case "l":
          $case = MB_CASE_LOWER;
          break;
        case "u":
          $case = MB_CASE_UPPER;
          break;
        default:
          $case = MB_CASE_TITLE;
      }
      if ( !empty($st) ){
        $st = mb_convert_case($st, $case);
      }
      return $st;
    }
code_tokens: public static function change_case ( $ st , $ case = 'x' ) : string { $ st = self :: cast ( $ st ) ; $ case = substr ( strtolower ( ( string ) $ case ) , 0 , 1 ) ; switch ( $ case ) { case "l" : $ case = MB_CASE_LOWER ; break ; case "u" : $ case = MB_CASE_UPPER ; break ; default : $ case = MB_CASE_TITLE ; } if ( ! empty ( $ st ) ) { $ st = mb_convert_case ( $ st , $ case ) ; } return $ st ; }
docstring: Converts the case of a string.
  
  ```php
  $st = 'TEST CASE';
  \bbn\x::dump(\bbn\str::change_case($st, 'lower'));
  // (string) "test case"
  \bbn\x::dump(\bbn\str::change_case('TEsT Case', 'upper'));
  // (string) "TEST CASE"
  \bbn\x::dump(\bbn\str::change_case('test case'));
  // (string) "Test Case"
  ```
  
  @param mixed $st The item to convert.
  @param mixed $case The case to convert to ("lower" or "upper"), default being the title case.
  @return string
docstring_tokens: Converts the case of a string .