如何连接 2 个字符串?
在这里,我尝试定义一个将“f”连接到提供的字符串末尾的函数:
concat_f(bar) = output{
item := ["f"]
x := concat(bar, item)
output := x
}
但是当我尝试使用它时(传入bar
as "123"
):
hello {
x := input.bar
y := concat_f(x)
y == "123f"
}
我得到这hello
等于false
这是为什么?以及如何正确连接字符串?