mb_strpos

Fallback for mb_strpos for users without multibyte support.

Description

mb_strpos( (string) $haystack, (string) $needle, (int) $offset = 0 ); 

Parameters (3)

0. $haystack (string)
The string to search within
1. $needle (string)
The string to search for
2. $offset — Optional. (int)
The offset.

Usage

  1. if ( !function_exists( 'mb_strpos' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'breadcrumb-navxt/includes/multibyte_supplicant.php'; 
  3.  
  4. // the string to search within 
  5. $haystack = ''; 
  6.  
  7. // the string to search for 
  8. $needle = ''; 
  9.  
  10. // The offset. 
  11. $offset = -1; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = mb_strpos($haystack, $needle, $offset); 
  15.  

Defined (1)

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

/includes/multibyte_supplicant.php  
  1. function mb_strpos($haystack, $needle, $offset = 0) 
  2. return strpos($haystack, $needle, $offset);