2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
13
Task/Pangram-checker/PowerShell/pangram-checker-1.psh
Normal file
13
Task/Pangram-checker/PowerShell/pangram-checker-1.psh
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
function Test-Pangram ( [string]$Text, [string]$Alphabet = 'abcdefghijklmnopqrstuvwxyz' )
|
||||
{
|
||||
$Text = $Text.ToLower()
|
||||
$Alphabet = $Alphabet.ToLower()
|
||||
|
||||
$IsPangram = $Alphabet.ToCharArray().Where{ $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 'Съешь же ещё этих мягких французских булок, да выпей чаю' 'абвгдежзийклмнопрстуфхцчшщъыьэюяё'
|
||||
13
Task/Pangram-checker/PowerShell/pangram-checker-2.psh
Normal file
13
Task/Pangram-checker/PowerShell/pangram-checker-2.psh
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
function Test-Pangram ( [string]$Text, [string]$Alphabet = 'abcdefghijklmnopqrstuvwxyz' )
|
||||
{
|
||||
$Text = $Text.ToLower()
|
||||
$Alphabet = $Alphabet.ToLower()
|
||||
|
||||
$IsPangram = ( $Alphabet.ToCharArray() | Where { $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 'Съешь же ещё этих мягких французских булок, да выпей чаю' 'абвгдежзийклмнопрстуфхцчшщъыьэюяё'
|
||||
Loading…
Add table
Add a link
Reference in a new issue