For more information... RTFM!
NAVIGATION
PAGES THAT LINK HERE
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

oneline

Discard all but the first line of the body text.  The first line ends with any one of the following:

  • Carriage return ("\r").
  • Line feed ("\n").
  • ASCII NUL ("\0").

See also: 

  • The line filter, which also discards all but the first line of the body text, but has a different rule as to what is classed at the end of a line.
  • The nullselect filter, which discards everything after the first ASCII NUL ("\0") character.


Availability

Availability

This filter was introduced in version 5.4.0, and is therefore not available for use with any earlier Interchange version.

Example

[filter oneline]Line 1
Line 2
Line 3
[/filter]

Results in:

Line 1

Source code

sub {
    my $val = shift;

    $val =~ s/[\r\n\0].*//s;
    return $val;
}

Category:  Filters
Last modified by: Kevin Walsh
Modification date: Monday 26 February 2007 at 11:59 AM (EST)
Home  |  Legal nonsense  |  Privacy policy  |  Contact us