This commit is contained in:
2026-04-27 14:42:47 +07:00
parent 960b6b0931
commit 56c4cdb95a
6 changed files with 231 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
# Problem 3: String Manipulation
# Concepts: String vs &str, slicing, iteration
# Count words in a string, ignoring punctuation:
# Input: "Hello, world! How are you?"
# Output: 5
# Also return vector of unique words (lowercase, no punctuation)
# ---------------------------------------------- 100 --------------------------------------------- #
function main()
text = "Hello, world! How are you?"
text_list = split(text, " ")
println("$(length(text_list))")
end
main()