Strings in TechScript are UTF-8 encoded, dynamic sequences of characters.
String literals are enclosed in double quotes:
greeting = "Hello, World!"
To insert variables or expressions directly into strings, prepend a $ character to create an interpolated string:
name = "Boss"
age = 30
message = $"Hello {name}, you are {age} years old."
say message
Expressions inside the curly brackets {} are fully evaluated at runtime:
say $"1 + 1 is {1 + 1}"
Use the + operator to join strings:
full_name = "Tech" + "Script"
Retrieve character count:
say len("TechScript") # 10
Check if a substring exists inside a string:
when "Script" in "TechScript"
say "Matches!"
end