For more information... RTFM!
NAVIGATION
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

compress_space

Eliminate leading and trailing whitespace, and compress all "in-string" whitespace occurrences so that you never see one whitespace character immediately following another.

Example

**[filter compress_spaceThis  is a     test    [/filter]**

Results in:

**This is a test**

Source code

sub {
    my $val = shift;

    $val =~ s/\s+$//g;
    $val =~ s/^\s+//g;
    $val =~ s/\s+/ /g;
}

Category:  Filters
Last modified by: Kevin Walsh
Modification date: Thursday 15 February 2007 at 5:59 PM (EST)
Home  |  Legal nonsense  |  Privacy policy  |  Contact us