Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
17
Task/Pangram-checker/V-(Vlang)/pangram-checker.v
Normal file
17
Task/Pangram-checker/V-(Vlang)/pangram-checker.v
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
const alpha = "abcdefghjiklmnopqrstuvwxyz"
|
||||
|
||||
fn main() {
|
||||
mut s := "The quick brown fox jumps over the lazy dog."
|
||||
println(is_pangram(s))
|
||||
s = "My dog has fleas."
|
||||
println(is_pangram(s))
|
||||
}
|
||||
|
||||
fn is_pangram(txt string) bool {
|
||||
mut str := txt
|
||||
str = txt.to_lower()
|
||||
for elem in alpha {
|
||||
if elem.ascii_str() !in str.split('') {return false}
|
||||
}
|
||||
return true
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue