Man pages sections > man3 > Catmandu::Fix::trim

Catmandu::Fix::trim - trim leading and ending junk from the value of a field

Catmandu::Fix::trim(3pm) User Contributed Perl Documentation Catmandu::Fix::trim(3pm)

NAME

Catmandu::Fix::trim - trim leading and ending junk from the value of a field

SYNOPSIS

   # the default mode trims whitespace
   # e.g. foo => '   abc   ';
   trim(foo) # foo => 'abc';
   trim(foo, whitespace) # foo => 'abc';
   
   # trim non-word characters
   # e.g. foo => '   abc  / : .';
   trim(foo, nonword) # foo => 'abc';
   # trim accents
   # e.g. foo => 'francais' ;
   trim(foo,diacritics) # foo => 'francais'

SEE ALSO

Catmandu::Fix
2017-10-01 perl v5.26.0