VBScript Linker Functie


❮Volledige VBScript-referentie

De functie Links retourneert een opgegeven aantal tekens vanaf de linkerkant van een tekenreeks.

Tip: Gebruik de Len-functie om het aantal tekens in een string te vinden.

Tip: Kijk ook bij de Rechts functie.

Syntaxis

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

Voorbeelden

voorbeeld 1

<%

txt="This is a beautiful day!"
response.write(Left(txt,15))

%>

De uitvoer van de bovenstaande code zal zijn:

This is a beaut

Voorbeeld 2

Retourneer de hele string:

<%

txt="This is a beautiful day!"
x=Len(txt)
response.write(Left(txt,x))

%>

De uitvoer van de bovenstaande code zal zijn:

This is a beautiful day!

❮Volledige VBScript-referentie