Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,13 +0,0 @@
|
|||
function Test-Pangram ( [string]$Text, [string]$Alphabet = 'abcdefghijklmnopqrstuvwxyz' )
|
||||
{
|
||||
$Text = $Text.ToLower()
|
||||
$Alphabet = $Alphabet.ToLower()
|
||||
|
||||
$IsPangram = @( $Alphabet.ToCharArray() | Where-Object { $Text.Contains( $_ ) } ).Count -eq $Alphabet.Length
|
||||
|
||||
return $IsPangram
|
||||
}
|
||||
|
||||
Test-Pangram 'The quick brown fox jumped over the lazy dog.'
|
||||
Test-Pangram 'The quick brown fox jumps over the lazy dog.'
|
||||
Test-Pangram 'Съешь же ещё этих мягких французских булок, да выпей чаю' 'абвгдежзийклмнопрстуфхцчшщъыьэюяё'
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
Function Test-Pangram ( [string]$Text, [string]$Alphabet = 'abcdefghijklmnopqrstuvwxyz' )
|
||||
{
|
||||
$alSet = [Collections.Generic.HashSet[char]]::new($Alphabet.ToLower())
|
||||
$textSet = [Collections.Generic.HashSet[char]]::new($Text.ToLower())
|
||||
|
||||
$alSet.ExceptWith($textSet) # remove text chars from the alphabet
|
||||
|
||||
return $alSet.Count -eq 0 # any alphabet letters still remaining?
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue