English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Cadeia de Caracteres do Erlang
Este método combina2strings e retorna a string concatenada.
concat(str1,str2)
str1,str2 −Necessário conectar2strings.
Retorno2ligação de strings.
-module(helloworld). -import(string,[concat/2]). -export([start/ start() -> Str1 = "This is a ", Str2 = "string", Str3 = concat(Str1,Str2), io:fwrite("~p~n",[Str3]).
Quando executamos o programa acima, obteremos os seguintes resultados.
"This is a string"