Odin SolutionsOdin Solutions
🎮
Game Chatroom
Week 10, 2026
All SolutionsWord by word, char by char, check in range | greenya | Odin Solutions
package main
import "core:fmt"
import "core:strings"
words_txt_bytes := #load("words.txt")
main :: proc () {
words_txt_trimmed := strings.trim(string(words_txt_bytes), "\n\r\t ")
words := strings.split_lines(words_txt_trimmed)
valid: int
next: for w in words {
if len(w) < 2 do continue
for c in w do if c < 'a' || c > 'f' do continue next
valid += 1
fmt.println(w)
}
fmt.println("--------------------------")
fmt.println("total words checked:", len(words))
fmt.println("total valid words :", valid)
}