1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

examples: fix typos (#18229)

This commit is contained in:
Turiiya
2023-05-25 15:54:46 +02:00
committed by GitHub
parent caee3935a5
commit 993546a0a2
28 changed files with 89 additions and 89 deletions

View File

@ -31,17 +31,17 @@ fn main() {
// Creates an array of words from a given string
fn extract_words(contents string) []string {
mut splitted := []string{}
for space_splitted in contents.to_lower().split(' ') {
if space_splitted.contains('\n') {
splitted << space_splitted.split('\n')
mut splits := []string{}
for space_split in contents.to_lower().split(' ') {
if space_split.contains('\n') {
splits << space_split.split('\n')
} else {
splitted << space_splitted
splits << space_split
}
}
mut results := []string{}
for s in splitted {
for s in splits {
result := filter_word(s)
if result == '' {
continue