Remove unused function attribute_contains
This commit is contained in:
parent
a3e350313d
commit
7a9c5d10ee
2 changed files with 0 additions and 57 deletions
|
@ -64,25 +64,6 @@ function perms2str($p) {
|
|||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* for html,xml parsing - let's say you've got
|
||||
* an attribute foobar="class1 class2 class3"
|
||||
* and you want to find out if it contains 'class3'.
|
||||
* you can't use a normal sub string search because you
|
||||
* might match 'notclass3' and a regex to do the job is
|
||||
* possible but a bit complicated.
|
||||
* pass the attribute string as $attr and the attribute you
|
||||
* are looking for as $s - returns true if found, otherwise false
|
||||
*
|
||||
* @param string $attr attribute value
|
||||
* @param string $s string to search
|
||||
* @return boolean True if found, False otherwise
|
||||
*/
|
||||
function attribute_contains($attr, $s) {
|
||||
$a = explode(' ', $attr);
|
||||
return (count($a) && in_array($s,$a));
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare activity uri. Knows about activity namespace.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue