在Erlang中将文字文本连接到变量(字符串连接)

hor*_*air 4 erlang

我有: String = "there"

我尝试了各种各样的东西,比如:"Hello " ++ Stringstring:concat("Hello", String).输出总是以文字字符串"Hello"结尾,它是表示字符串字符的整数,而不是字母.

如何在Erlang中将变量中的文字字符串和字符串组合在一起?

Hyn*_*dil 6

适合我.

1> String = "there".
"there"
2> "Hello " ++ String.
"Hello there"
Run Code Online (Sandbox Code Playgroud)