Strings.RSet(String, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a right-aligned string containing the specified string adjusted to the specified length.
public:
static System::String ^ RSet(System::String ^ Source, int Length);
public static string RSet (string? Source, int Length);
public static string RSet (string Source, int Length);
static member RSet : string * int -> string
Public Function RSet (Source As String, Length As Integer) As String
Parameters
- Source
- String
Required. String
expression. Name of string variable.
- Length
- Int32
Required. Integer
expression. Length of returned string.
Returns
A right-aligned string containing the specified string adjusted to the specified length.
Examples
This example demonstrates the use of the RSet
function.
Dim testString As String = "Right"
' Returns " Right"
Dim rString As String = RSet(testString, 11)
Remarks
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.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om