Strings.LSet(String, Int32) Yöntem
Tanım
Belirtilen uzunluğa ayarlanmış belirtilen dizeyi içeren sola hizalanmış bir dize döndürür.Returns a left-aligned string containing the specified string adjusted to the specified length.
public:
static System::String ^ LSet(System::String ^ Source, int Length);
public static string LSet (string? Source, int Length);
public static string LSet (string Source, int Length);
static member LSet : string * int -> string
Public Function LSet (Source As String, Length As Integer) As String
Parametreler
- Source
- String
Gereklidir.Required. String ifadesini.String expression. Dize değişkeninin adı.Name of string variable.
- Length
- Int32
Gereklidir.Required. Integer ifadesini.Integer expression. Döndürülen dize uzunluğu.Length of returned string.
Döndürülenler
Belirtilen uzunluğa ayarlanmış belirtilen dizeyi içeren sola hizalanmış bir dize.A left-aligned string containing the specified string adjusted to the specified length.
Örnekler
Bu örnek, işlevinin kullanımını gösterir LSet .This example demonstrates the use of the LSet function.
Dim testString As String = "Left"
Dim lString As String
' Returns "Left "
lString = LSet(testString, 10)
' Returns "Le"
lString = LSet(testString, 2)
' Returns "Left"
lString = LSet(testString, 4)
Açıklamalar
Belirtilen dize belirtilen uzunluktan uzunsa, döndürülen dize belirtilen uzunluğa kısaltıldı.If the specified string is longer than the specified length, the returned string is shortened to the specified length. Belirtilen dize belirtilen uzunluktan kısaysa, uygun uzunluğu oluşturmak için döndürülen dizenin sağ ucuna boşluklar eklenir.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.