strtrimr#

Purpose#

Strips all whitespace characters from the right side of each element in a string array.

Format#

y = strtrimr(sa)#
Parameters:

sa (NxM string array) – data

Returns:

y (NxM string array) – contains contents in sa with all whitespace characters from the right side of each element stripped.

Examples#

// Create a string array with trailing whitespace
sa = "hello   " $| "world   ";

// Strip whitespace from the right
y = strtrimr(sa);
print y;

The code above produces the following output:

hello
world

Source#

strfns.src