Lua string.gsub("^%s*(.-)%s*$","%1") Online

Trim leading and trailing whitespace or chosen characters. Automatic submit runs on each keystroke and paste.

Viewer Index · Tools Index · Lua Functions · Auto-run on input
Ready.

Details