hholzgra                Sun Jun  9 06:41:41 2002 EDT

  Added files:                 
    /phpdoc/scripts/apply       lower.php 
  Log:
  converts <refname>s to lowercase
  
  

Index: phpdoc/scripts/apply/lower.php
+++ phpdoc/scripts/apply/lower.php
<?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;
                }
        }

#       while( ereg("<function>([[:alnum:]_]+[[:upper:]][[:alnum:]_]+)</function>", 
$input, $matches)) {
#               $name = $matches[1];
#               $lower = strtolower($name);
#               if($lower != $name) {
#                       $input = str_replace("<function>$name</function>", 
"<function>$lower</function>", $input);
#                       $flag = true;
#               }
#       }

        return $flag ? $input : false ;
}

?>


Reply via email to