VBScript Sol İşlevi
❮ Komple VBScript Referansı
Left işlevi, bir dizenin sol 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: Ayrıca Sağ işlevine bakın.
Sözdizimi
Left(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(Left(txt,15))
%>
Yukarıdaki kodun çıktısı şöyle olacaktır:
This is a beaut
Örnek 2
Tüm dizeyi döndür:
<%
txt="This is a beautiful day!"
x=Len(txt)
response.write(Left(txt,x))
%>
Yukarıdaki kodun çıktısı şöyle olacaktır:
This is a beautiful day!
❮ Komple VBScript Referansı