Added strings.cosmo example

This commit is contained in:
CPunch 2021-01-17 14:11:05 -06:00
parent 3c19079262
commit 85503025dd
1 changed files with 9 additions and 0 deletions

9
examples/strings.cosmo Normal file
View File

@ -0,0 +1,9 @@
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 .. "\"")