Changeset 14887

Show
Ignore:
Timestamp:
02/12/08 10:58:11 (10 months ago)
Author:
rambo
Message:

clear null characters (use "\x00" or just null if you actually need to specify null) as well

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.core/support/normalize_whitespace_normalizer.php

    r14795 r14887  
    88    ( 
    99        'newlines', 
     10        'clearnulls', 
    1011        'tabs2spaces', 
    1112        'open_pre_strip', 
     
    3132        } 
    3233        return $data; 
     34    } 
     35 
     36    /** 
     37     * Replaces nulls with empty string 
     38     * 
     39     * @param string $data data to normalize (usually file contents) 
     40     * @return string normalized 
     41     */     
     42    function clearnulls($data) 
     43    { 
     44        return str_replace(null, '', $data); 
    3345    } 
    3446