Trim: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Brendon (talk | contribs)
Created page with "TRIM(''string'') '''Description''' TRIM returns a string with all leading and trailing spaces removed. The required parameter, ''string'', is any valid string expression. '..."
 
Brendon (talk | contribs)
No edit summary
Line 1: Line 1:
TRIM(''string'')
Trim(''string'')


'''Description'''
== Description ==


TRIM returns a string with all leading and trailing spaces removed. The required parameter, ''string'', is any valid string expression.
Trim returns a string with all leading and trailing spaces removed. The required parameter, ''string'', is any valid string expression.


'''Example'''
== Example ==


<pre>
<pre>
REM TRIM Example
Rem Trim Example
'TRIM trims leading and trailing spaces
'Trim trims leading and trailing spaces
DIM Spacey
Dim Spacey
Spacey = " K "
Spacey = " K "
PRINT "(" & Spacey & ")"
Print "(" & Spacey & ")"
PRINT "(" & TRIM(Spacey) & ")"
Print "(" & Trim(Spacey) & ")"
</pre>
</pre>


'''Output'''
== Output ==


<pre>
<pre>
Line 23: Line 23:
</pre>
</pre>


'''Related Items'''
== Related Items ==


[[ltrim|LTRIM]], [[rtrim|RTRIM]]
[[ltrim|LTRIM]], [[rtrim|RTRIM]]
[[Category:Language Reference]]

Revision as of 04:36, 17 August 2012

Trim(string)

Description

Trim returns a string with all leading and trailing spaces removed. The required parameter, string, is any valid string expression.

Example

Rem Trim Example
'Trim trims leading and trailing spaces
Dim Spacey
Spacey = " K "
Print "(" & Spacey & ")"
Print "(" & Trim(Spacey) & ")"

Output

( K )
(K)

Related Items

LTRIM, RTRIM