Name

trim() — Trim characters from both ends of a string

Common Usage

trim( text )
trim( text, extra )

Description

The trim() function returns a copy of text that has been stripped of any prefix or suffix that consists solely of characters from extra . Characters from extra that are contained in the body of text remain untouched.

If extra is not provided, it is assumed to consist of the ASCII space (0x20) character. By default, tab characters and other whitespace are not trimmed.

See Also

ltrim(), rtrim()

Get Using SQLite now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.