diff --git a/examples/strings.cosmo b/examples/strings.cosmo new file mode 100644 index 0000000..d1065dc --- /dev/null +++ b/examples/strings.cosmo @@ -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 .. "\"") \ No newline at end of file