VBScript Sağ İşlevi
❮ Komple VBScript Referansı
Right işlevi, bir dizenin sağ tarafından belirtilen sayıda karakter döndürür.
İpucu: Bir dizedeki karakter sayısını bulmak için Len işlevini kullanın.
İpucu: Sol işlevine de bakın.
Sözdizimi
Right(string,length)
Parameter | Description |
---|---|
string | Required. The string to return characters from |
length | Required. Specifies how many characters to return. If set to 0, an empty string ("") is returned. If set to greater than or equal to the length of the string, the entire string is returned |
Örnekler
örnek 1
<%
txt="This is a beautiful day!"
response.write(Right(txt,10))
%>
Yukarıdaki kodun çıktısı şöyle olacaktır:
tiful day!
Örnek 2
Tüm dizeyi döndür:
<%
txt="This is a beautiful day!"
x=Len(txt)
response.write(Right(txt,x))
%>
Yukarıdaki kodun çıktısı şöyle olacaktır:
This is a beautiful day!
❮ Komple VBScript Referansı