trim

Syntax

trim(X)

Details

Trim all white spaces around the string.

Parameters

X is a string scalar/vector.

Returns

A scalar or vector of type STRING.

Examples

x=["  t1", " t2 "];
trim(x);
// output: ["t1","t2"]

Related function: strip