Skip to content
bergsma edited this page Sep 26, 2014 · 3 revisions

#trim

###Trim the trailing space characters from a string.

Syntax

result = trim string ;

Arguments

  1. str string

The string variable to trim.

Return Value

str result
  • str : The string with trailing space characters removed.

The STATUS variable is set to $ACKNOWLEDGE

str result
  • str : The string with trailing space characters removed.

The STATUS variable is set to $ACKNOWLEDGE

Exceptions

  • %ARGUMENT: Invalid arguments. Usage: result = trim string ;

  • %BOUNDS: Subscript is out of bounds in trim()

Description

This method works with str and list variables with a single string element. Only trailing space characters are removed. Leading white space characters and trailing tab characters are ignored.

Examples

puts "Create an example for the function 'trim'" ;

Related Links

None

Clone this wiki locally