Função de junção do VBScript
❮ Referência completa do VBScript
A função Join retorna uma string que consiste em várias substrings em uma matriz.
Sintaxe
Join(list[,delimiter])
Parameter | Description |
---|---|
list | Required. A one-dimensional array that contains the substrings to be joined |
delimiter | Optional. The character(s) used to separate the substrings in the returned string. Default is the space character |
Exemplo
Exemplo
Separando itens em um array, com e sem usar o parâmetro delimiter:
<%
days=Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat")
response.write(Join(days) & "<br />")
response.write(Join(days,",") & "<br />")
response.write(Join(days," ### "))
%>
A saída do código acima será:
Sun Mon Tue Wed Thu Fri Sat
Sun,Mon,Tue,Wed,Thu,Fri,Sat
Sun ### Mon ### Tue ### Wed ### Thu ### Fri ### Sat
❮ Referência completa do VBScript