std-string-xxx-trim


Synopsis

(std-string-trim <charbag> <str> )

(std-string-left-trim <charbag> <str> )

(std-string-right-trim <charbag> <str> )

Description

STD-STRING-LEFT-TRIM trims all occurances any charcater in charbag of the from the beginning of the string, STD-STRING-RIGHT-TRIM from the end element and STD-STRIM-TRIM from both sides.

They stop on the first occurance of any charcacter which is not in charbag.

Examples

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

Arguments

charbag: a string. A set of characters in no particular order.

str: a string.

Return Value

A string.

Side Effects

None.

Module

(std-require 'STDSTR)

Defined in STDSTR