Julia Language Strings Hello, World!

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

Strings in Julia are delimited using the " symbol:

julia> mystring = "Hello, World!"
"Hello, World!"

Note that unlike some other languages, the ' symbol cannot be used instead. ' defines a character literal; this is a Char data type and will only store a single Unicode scalar value:

julia> 'c'
'c'

julia> 'character'
ERROR: syntax: invalid character literal

One can extract the unicode scalar values from a string by iterating over it with a for loop:

julia> for c in "Hello, World!"
           println(c)
       end
H
e
l
l
o
,
 
W
o
r
l
d
!


Got any Julia Language Question?