english/libraries/joomla/utilities/string.php
/**
	 * UTF-8 aware alternative to strcspn
	 * Find length of initial segment not matching mask
	 *
	 * @param   string   $str     The string to process
	 * @param   string   $mask    The mask
	 * @param   integer  $start   Optional starting character position (in characters)
	 * @param   integer  $length  Optional length
	 *
	 * @return  integer  The length of the initial segment of str1 which does not contain any of the characters in str2
	 *
	 * @see     http://www.php.net/strcspn
	 * @since   11.1
	 */
UTF-8 aware alternative to strcspn
Find length of initial segment not matching mask

@param   string   $str     The string to process
@param   string   $mask    The mask
@param   integer  $start   Optional starting character position (in characters)
@param   integer  $length  Optional length

@return  integer  The length of the initial segment of str1 which does not contain any of the characters in str2


UTF - 8 aware alternative to strcspn Find length of initial segment not matching mask @param string $str The string to process @param string $mask The mask @param integer $start Optional starting character position ( in characters ) @param integer $length Optional length @return integer The length of the initial segment of str1 which does not contain any of the characters in str2
public static function strcspn($str, $mask, $start = NULL, $length = NULL)
	{
		jimport('phputf8.strcspn');
		if ( $start === FALSE && $length === FALSE ) {
			return utf8_strcspn($str, $mask);
		} else if ( $length === FALSE ) {
			return utf8_strcspn($str, $mask, $start);
		} else {
			return utf8_strcspn($str, $mask, $start, $length);
		}
	}
public static function strcspn ( $ str , $ mask , $ start = NULL , $ length = NULL ) { jimport ( 'phputf8.strcspn' ) ; if ( $ start === FALSE && $ length === FALSE ) { return utf8_strcspn ( $ str , $ mask ) ; } else if ( $ length === FALSE ) { return utf8_strcspn ( $ str , $ mask , $ start ) ; } else { return utf8_strcspn ( $ str , $ mask , $ start , $ length ) ; } }
UTF-8 aware alternative to strcspn
 Find length of initial segment not matching mask
UTF - 8 aware alternative to strcspn Find length of initial segment not matching mask