Concatenation of strings not working inside a function

#1

The simple function of concatenating strings does not seem to be working. I tried this simplest of codes on v1.1.0.

function f(name::String) :: String
return String(name, “_GaussKer”);
end
julia> s = f(“test”)
ERROR: MethodError: no method matching String(::String, ::String)
Closest candidates are:

Do you know what is happening ?

#2

For concatenation, you want string (or the * operator), not String.

3 Likes
#3

string lowercase is a function (like println)
String uppercase is a type (like Float64)

2 Likes
#4

Thank you for the clarification. It is really helpful.