all AI news
Julia “string” and methods()
Sept. 19, 2022, 4:01 p.m. | Vivek Chaudhary
Towards AI - Medium pub.towardsai.net
The objective of this article is to understand string-type variables in Julia Programming and various operations associated with them.
Strings in Julia are defined in “double quotes”.
- Declare a string variable s1.
s1=”hello world”
println(s1)
print(typeof(s1)) #to check the datatype of variable
Output:
hello world
String
2. String Concatenation
s1=”hello vivek”
s2=”welcome to julia tutorial”
#using * operator
println(s1*’ ‘*s2)
#using string function
println(string(s1,’ ‘,s2))
Output:
"*": hello vivek welcome to julia tutorial
"string": hello vivek welcome to …
coding julia julialang programming programming languages string
More from pub.towardsai.net / Towards AI - Medium
Jobs in AI, ML, Big Data
Founding AI Engineer, Agents
@ Occam AI | New York
AI Engineer Intern, Agents
@ Occam AI | US
AI Research Scientist
@ Vara | Berlin, Germany and Remote
Data Architect
@ University of Texas at Austin | Austin, TX
Data ETL Engineer
@ University of Texas at Austin | Austin, TX
Data Engineer
@ Kaseya | Bengaluru, Karnataka, India