Computer/웹
(ASP) 문자열 나누기 (특정 문자 기준) - Split
ywlee
2015. 4. 29. 15:06
<%
string1 = "hahah,hohoho,hihihi,hehehe"
string2 = Split(string1, ",")
response.write "string2(0) = " & string2(0) & "<br>"
response.write "string2(1) = " & string2(1) & "<br>"
response.write "string2(2) = " & string2(2) & "<br>"
response.write "string2(3) = " & string2(3) & "<br>"
%>
//////////////// 결과//////////////////////
string2(0) = hahah
string2(1) = hohoho
string2(2) = hihihi
string2(3) = hehehe