Function __global->strcspn

Definitions

sources_custom/phpstub.php

  • Find length of initial segment not matching mask.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$str1 string No No required parameter N/A N/A The subject string
$str2 string No No required parameter N/A N/A The string of stop characters

Returns

  • The length
  • Type: integer
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find length of initial segment not matching mask.
 *
 * @param  string $str1 The subject string
 * @param  string $str2 The string of stop characters
 * @return integer The length
 */

function strcspn(string $str1, string $str2) : int