11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

TRIM<br />

Syntax<br />

TRIM(str.expr[,char[,type]])<br />

Description<br />

The <strong>UniBasic</strong> TRIM function removes all spaces or every occurrence of a specified<br />

character from a string expression. If UniData does not find an occurrence of the<br />

specified character, the string remains unchanged. TRIM removes leading or trailing<br />

occurrences of the specified character from a string, and converts embedded spaces<br />

or occurrences of the specified characters in a string to one space or a specified<br />

character. UniData does not remove single spaces or occurrences of the specified<br />

character embedded in the string.<br />

Parameters<br />

The following table describes each parameter of the syntax.<br />

Parameter Description<br />

1-881 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />

str.expr Specifies a string from which to remove spaces or the specified character.<br />

,char Specifies a character to remove from str.expr. The default is a space.<br />

,type Specifies the type of removal to perform. If char is an empty string, UniData<br />

does not perform the operation.<br />

L – Removes all leading occurrences of char.<br />

T – Removes all trailing occurrences of char.<br />

B – Removes leading and trailing occurrences of char.<br />

A – Removes all occurrences of char.<br />

R – (Default) Removes all leading, trailing, and contiguous occurrences of<br />

char.<br />

TRIM Parameters

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!