function xmlrpc_test_countTheEntities

1 call to xmlrpc_test_countTheEntities()
XmlRpcValidatorTest::testValidator in drupal/core/modules/xmlrpc/lib/Drupal/xmlrpc/Tests/XmlRpcValidatorTest.php
Run validator1 tests.
1 string reference to 'xmlrpc_test_countTheEntities'
xmlrpc_test_xmlrpc in drupal/core/modules/xmlrpc/tests/modules/xmlrpc_test/xmlrpc_test.module
Implements hook_xmlrpc().

File

drupal/core/modules/xmlrpc/tests/modules/xmlrpc_test/xmlrpc_test.module, line 13

Code

function xmlrpc_test_countTheEntities($string) {
  return array(
    'ctLeftAngleBrackets' => substr_count($string, '<'),
    'ctRightAngleBrackets' => substr_count($string, '>'),
    'ctAmpersands' => substr_count($string, '&'),
    'ctApostrophes' => substr_count($string, "'"),
    'ctQuotes' => substr_count($string, '"'),
  );
}