Combine two strings and put in seperate line as single strings

I have a=‘light’, b=‘switch’, I combined a and b using
c=a*b and got 'lightswitch

but I need c= light
switch

purpose is to node labeling, where the size is limited

Sorry, what is the question? You want a line break? You can get one with "$a\n$b".

Or

julia> a = "light"
"light"

julia> b = "switch"
"switch"

julia> c = a * "\n" * b
"light\nswitch"

julia> println(c)
light
switch
1 Like

Another option is join:

vs = ["The", "switch", "is", "on"]
str = join(vs,"\n")
print(str)
1 Like