Catmandu::Fix::trim - trim leading and ending junk from the value of a field
Contents
Name
Catmandu::Fix::trim - trim leading and ending junk from the value of a field
See Also
Catmandu::Fix
perl v5.40.0 2025-01-17 Catmandu::Fix::trim(3pm)
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 => 'français' ;
trim(foo,diacritics) # foo => 'francais'
