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