diff options
| author | HVukman <peterslopp@googlemail.com> | 2025-07-12 08:52:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-12 08:52:22 +0200 |
| commit | 405c8822cbc4032667b9275f30e35cb868b8c582 (patch) | |
| tree | 0a4c2a982d84c9b67359649a5bced894dc417459 | |
| parent | d6ebdeddf997691097e800f22cf8d79842d90a75 (diff) | |
| download | perlweeklychallenge-club-405c8822cbc4032667b9275f30e35cb868b8c582.tar.gz perlweeklychallenge-club-405c8822cbc4032667b9275f30e35cb868b8c582.tar.bz2 perlweeklychallenge-club-405c8822cbc4032667b9275f30e35cb868b8c582.zip | |
Create 329_p1.lua
| -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") |
