<< Prev        Next >>

LTrim

Function

To delete a leading space in a string.

Syntax

LTrim(string)

Guaranteed entry

String
Designate string type data.

Return value

Return string type data with the leading space of the string deleted.

Description

A designated string is returned with any leading space, etc. deleted.

Character to delete Character code
Space (single byte) Chr(32)
Space (double byte)
Tab Chr(9)
Line feed character Chr(10)
Carriage return Chr(13)

Related Terms

-

Attention

-

Example

'!TITLE "Deleting Leading Space of String"
' Display a string whose space is deleted from the leading of the string on the message output 
window Sub Sample_LTrim Dim aaa As String Dim bbb As String Dim ccc As String Dim ddd as String ' Assign a string " Denso Corporation" to which a one byte space is input at its leading to aaa aaa = " Denso Corporation" ' Display "Denso Corporation" on the message output window PrintDbg aaa ' Assign a string " Denso Corporation" to which a tab is input at its leading to bbb bbb = " Denso Corporation" ' Display "Denso Corporation" on the message output window PrintDbg bbb ' Assign a string of aaa from which space is deleted from its leading to ccc ccc = Trim( aaa ) ' Assign a string of bbb from which space is deleted from its leading to ddd ddd = Trim( bbb ) ' Display "Denso Corporation" on the message output window PrintDbg ccc ' Display "Denso Corporation" on the message output window PrintDbg ddd End Sub

<< Prev        Next >>