Concatenation ( * )
Try it yourself →Concatenates two strings.
Syntax
text * text
Description
In Julia, text concatenation is done with * (not +!). Convert numbers to text first with string() or embed them with $.
Example
name = "Hex"
println(name * "Library")
println("Score: " * string(95))Expected output
HexLibrary Score: 95
When to use?
Creating strings.
Common mistakes
- ⚠️ + does not concatenate text; use *.