VBScript 오른쪽 기능


❮ 완전한 VBScript 참조

Right 함수는 문자열의 오른쪽에서 지정된 수의 문자를 반환합니다.

팁: Len 함수를 사용하여 문자열의 문자 수를 찾습니다.

팁: 왼쪽 기능도 살펴보세요.

통사론

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

실시예 1

<%

txt="This is a beautiful day!"
response.write(Right(txt,10))

%>

위 코드의 출력은 다음과 같습니다.

tiful day!

실시예 2

전체 문자열을 반환합니다.

<%

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

%>

위 코드의 출력은 다음과 같습니다.

This is a beautiful day!

❮ 완전한 VBScript 참조