String is not a data type in Erlang, it's just a list of integers. But Erlang shell try to display lists as strings if possible:
1> S = [65, 66, 67, 68, 69, 70].
"ABCDEF"
2> S = "ABCDEF".
"ABCDEF"
3> io:write(S).
[65,66,67,68,69,70]ok
4> [65, 66].
"AB"
5> [65, 66, 1].
[65,66,1]
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…