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:
@ -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
|
||||
|
Reference in New Issue
Block a user