VBScript regte funksie
❮ Voltooi VBScript-verwysing
Die Regs-funksie gee 'n gespesifiseerde aantal karakters van die regterkant van 'n string terug.
Wenk: Gebruik die Len-funksie om die aantal karakters in 'n string te vind.
Wenk: Kyk ook na die Linker-funksie.
Sintaksis
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 |
Voorbeelde
Voorbeeld 1
<%
txt="This is a beautiful day!"
response.write(Right(txt,10))
%>
Die afvoer van die kode hierbo sal wees:
tiful day!
Voorbeeld 2
Gee die hele string terug:
<%
txt="This is a beautiful day!"
x=Len(txt)
response.write(Right(txt,x))
%>
Die afvoer van die kode hierbo sal wees:
This is a beautiful day!
❮ Voltooi VBScript-verwysing