_strcspn

The Gravity PDF strcspn function.

Description

_strcspn( $str1, $str2, (constant) $start = null, (constant) $length = null ); 

Parameters (4)

0. $str1
The str1.
1. $str2
The str2.
2. $start — Optional. (constant) => null
The start.
3. $length — Optional. (constant) => null
The length.

Usage

  1. if ( !function_exists( '_strcspn' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'gravity-pdf/vendor/blueliquiddesigns/mpdf/includes/functions.php'; 
  3.  
  4. // The str1. 
  5. $str1 = null; 
  6.  
  7. // The str2. 
  8. $str2 = null; 
  9.  
  10. // The start. 
  11. $start = null; 
  12.  
  13. // The length. 
  14. $length = null; 
  15.  
  16. // NOTICE! Understand what this does before running. 
  17. $result = _strcspn($str1, $str2, $start, $length); 
  18.  

Defined (1)

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

/vendor/blueliquiddesigns/mpdf/includes/functions.php  
  1. function _strcspn($str1, $str2, $start=null, $length=null) { 
  2. $numargs = func_num_args(); 
  3. if ($numargs == 2) { 
  4. return strcspn($str1, $str2); 
  5. else if ($numargs == 3) { 
  6. return strcspn($str1, $str2, $start); 
  7. else { 
  8. return strcspn($str1, $str2, $start, $length);