Navigation: thinBasic Modules > Core > String handling > TRIMFULL$ |
|
Description
Return a copy of a string with leading and trailing characters removed, like TRIM$ function.
All double spaces inside MainString will be removed.
Syntax
s = TRIMFULL$(MainString)
Returns
String
Parameters
Name |
Type |
Optional |
Meaning |
MainString |
String |
No |
The string expression to check in order to remove spaces |
Remarks
Restrictions
See also
String Handling, TRIM$, LTRIM$, RTRIM$,
Examples
Thanks to Abraxas for the following script example
' Usage of the LTRIM$ Keyword example
' Usage of the RTRIM$ Keyword example
' Usage of the TRIM$ Keyword example
' Usage of the TRIMFILL$ Keyword
Dim MyOLDString As String VALUE "HELLO WORLD"
Dim MyOLD2String As String VALUE " A B C D E F "
Dim MyLTRIMString As String
Dim MyRTRIMString As String
Dim MyTRIMString As String
Dim MyTRIMFULLString As String
Dim sMsg As String
MyLTRIMString = LTRIM$(MyOLDString, Any "HELLO")
MyRTRIMString = RTRIM$(MyOLDString, Any "WORLD")
MyTRIMString = TRIM$(MyOLDString , Any "HEL")
MyTRIMFULLString = TRIMFULL$(MyOLD2String)
sMsg += "Normal " & MyOLDString & $CRLF & $CRLF
sMsg += "LTRIM$ " & MyLTRIMString & $CRLF & $CRLF
sMsg += "RTRIM$ " & MyRTRIMString & $CRLF & $CRLF
sMsg += "TRIM$ " & MyTRIMString & $CRLF & $CRLF
sMsg += "TRIMFULL$ " & MyTRIMFULLString & $CRLF & $CRLF ' spaces removed
MSGBOX 0, sMsg
© 2004-2008 thinBasic. All rights reserved. | Version 1.7.0.0 | Web Site: http://www.thinbasic.com |