std-trim


Synopsis

(std-trim <str>)

Description

STD-TRIM trims whitespace from the left and right end of a string. Whitespace is a set of the following characters: Tab "\t", Space " ", Newline "\n" and Carriage Return "\r".

So std-trim is basically implemented as:

(std-string-right-trim "\t\n\r " 
(str-string-left-trim "\t\n\r " str))

Example

(std-trim "\n\t test   ") => "test"

Arguments

str: a string.

Return Value

A string.

Side Effects

None.

Module

(std-require 'STDSTR)

Defined in STDSTR