mb_convert_case

A very hacky fallback for mb_convert_case for users without multibyte support.

Description

(string) mb_convert_case( (string) $str, (constant) $mode = MB_CASE_TITLE, (string) $encoding = 'UTF-8' ); 

Returns (string)

the case converted string

Parameters (3)

0. $str (string)
The string to change the case on
1. $mode — Optional. (constant) => MB_CASE_TITLE
The mode of case convert to use
2. $encoding — Optional. (string) => 'UTF-8'
The encoding of the string

Usage

  1. if ( !function_exists( 'mb_convert_case' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'breadcrumb-navxt/includes/multibyte_supplicant.php'; 
  3.  
  4. // the string to change the case on 
  5. $str = ''; 
  6.  
  7. // the mode of case convert to use 
  8. $mode = MB_CASE_TITLE; 
  9.  
  10. // the encoding of the string 
  11. $encoding = 'UTF-8'; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = mb_convert_case($str, $mode, $encoding); 
  15.  

Defined (1)

The function is defined in the following location(s).

/includes/multibyte_supplicant.php  
  1. function mb_convert_case($str, $mode = MB_CASE_TITLE, $encoding = 'UTF-8') 
  2. //Only implementing MB_CASE_TITLE 
  3. if($mode = MB_CASE_TITLE
  4. return ucwords($str); 
  5. return $str;