diff options
| -rw-r--r-- | challenge-329/hvukman/lua/329_p1.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/challenge-329/hvukman/lua/329_p1.lua b/challenge-329/hvukman/lua/329_p1.lua new file mode 100644 index 0000000000..726c0d15b7 --- /dev/null +++ b/challenge-329/hvukman/lua/329_p1.lua @@ -0,0 +1,17 @@ + +function counting (X) +print("string: ", X) +local ints = {} +-- store values as keys which are unique +for word in string.gmatch(X, "%d+") do + ints[word]= true +end +-- print keys + for i,v in pairs(ints) do + print (i) + end + end + +counting("the1weekly2challenge2") +counting("go21od1lu5c7k") +counting("4p3e2r1l") |
