Cosmo/examples/strings.cosmo

9 lines
214 B
Plaintext

var words = "hello world! this is a sentence with words separated by space":split(" ")
var str = ""
for (var i = 0; i < #words; i++) do
str = str .. words[i]
print(words[i])
end
print("\"" .. str .. "\"")