You are here

function simpletest_xmlrpc_countTheEntities in SimpleTest 5

Same name and namespace in other branches
  1. 6 simpletest_xmlrpc.module \simpletest_xmlrpc_countTheEntities()
1 call to simpletest_xmlrpc_countTheEntities()
XMLRPCValidator1Test::test_run_all_tests in tests/xmlrpc_validator1.test
1 string reference to 'simpletest_xmlrpc_countTheEntities'
simpletest_xmlrpc_xmlrpc in ./simpletest_xmlrpc.module
Implementation of hook_xmlrpc()

File

./simpletest_xmlrpc.module, line 30

Code

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