mirror of
https://github.com/CPunch/Cosmo.git
synced 2024-11-24 16:11:04 +00:00
Added strings.cosmo example
This commit is contained in:
parent
3c19079262
commit
85503025dd
9
examples/strings.cosmo
Normal file
9
examples/strings.cosmo
Normal 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 .. "\"")
|
Loading…
Reference in New Issue
Block a user