Export (0) Print
Expand All

RSet Function 

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

Parameters

Source

Required. String expression. String to be adjusted.

Length

Required. Integer expression. Length of returned string.

If Source is longer than Length, RSet returns only the leftmost characters, up to the length of Length. If Source is shorter than Length, RSet adds spaces to the left end of the string to produce the appropriate length.

This example demonstrates the use of the RSet function.

Dim TestString As String = "Right"
' Returns "      Right"
Dim rString As String = RSet(TestString, 11)

Namespace: Microsoft.VisualBasic

Module: Strings

Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)

Community Additions

ADD
Show:
© 2014 Microsoft