File: lower.php

package info (click to toggle)
php-doc 20100521-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 59,992 kB
  • ctags: 4,085
  • sloc: xml: 796,833; php: 21,338; cpp: 500; sh: 117; makefile: 58; awk: 28
file content (20 lines) | stat: -rw-r--r-- 383 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php

# convert function refnames to lowercase

function apply($input) {
	$flag = false;

	if( ereg("<refname>([^<]*)</refname>", $input, $matches)) {
		$name = $matches[1];
		$lower = strtolower($name);
		if($lower != $name) {
			$input = str_replace("<refname>$name</refname>", "<refname>$lower</refname>", $input);
			$flag = true;
		}
	}

	return $flag ? $input : false ;
}

?>