Returns a left-aligned string containing the specified string adjusted to the specified length.
Public Shared Function LSet( _ ByVal Source As String, _ ByVal Length As Integer _ ) As String
If the specified string is longer than the specified length, the returned string is shortened to the specified length. If the specified string is shorter than the specified length, spaces are added to the right end of the returned string to produce the appropriate length.
This example demonstrates the use of the LSet function.
Dim myString As String = "Left" Dim lString As String LString = LSet(myString, 10) ' Returns "Left "
Data Type Summary | RSet Function |