Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

deleted 20 characters in body
Source Link
Julian
  • 3.4k
  • 8
  • 19

PowerShell Core, (削除) 63 (削除ここまで) 5962 bytes

$args-match'\w'|%match'[a-z]'|%{"$_"|% *l*r}|group|%{,($_.Name,$_.Count)}

Try it online!

Down to 59 bytes using splattingTry it online!

$args-match'\w' match'[a-z]' # For each character argument, exclude non letters characters
|%{"$_"|% *l*r} # Converts to lowercase
|group # Groups them
|%{,($_.Name,$_.Count)} # build pairs of letters and counts

PowerShell Core, (削除) 63 (削除ここまで) 59 bytes

$args-match'\w'|%{"$_"|% *l*r}|group|%{,($_.Name,$_.Count)}

Try it online!

Down to 59 bytes using splatting

$args-match'\w'  # For each character argument, exclude non letters characters
|%{"$_"|% *l*r} # Converts to lowercase
|group # Groups them
|%{,($_.Name,$_.Count)} # build pairs of letters and counts

PowerShell Core, 62 bytes

$args-match'[a-z]'|%{"$_"|% *l*r}|group|%{,($_.Name,$_.Count)}

Try it online!

$args-match'[a-z]' # For each character argument, exclude non letters characters
|%{"$_"|% *l*r} # Converts to lowercase
|group # Groups them
|%{,($_.Name,$_.Count)} # build pairs of letters and counts
added 27 characters in body
Source Link
Julian
  • 3.4k
  • 8
  • 19

PowerShell Core, 63(削除) 63 (削除ここまで) 59 bytes

$args|% *l*r|% t*y|?{$_$args-match'\w'match'\w'|%{"$_"|% *l*r}|group|%{,($_.Name,$_.Count)}

Try it online! Try it online!

Down to 59 bytes using splatting

$args|% *l*r $args-match'\w' # For each stringcharacter argument, lowercase it
|% t*y # Splitexclude itnon inletters characters
|?|%{$_-match'\w'"$_"|% *l*r} # Excludes# nonConverts lettersto characterslowercase
|group # Groups them
|%{,($_.Name,$_.Count)} # build pairs of letters and counts

PowerShell Core, 63 bytes

$args|% *l*r|% t*y|?{$_-match'\w'}|group|%{,($_.Name,$_.Count)}

Try it online!

$args|% *l*r  # For each string argument, lowercase it
|% t*y # Split it in characters
|?{$_-match'\w'} # Excludes non letters characters
|group # Groups them
|%{,($_.Name,$_.Count)} # build pairs of letters and counts

PowerShell Core, (削除) 63 (削除ここまで) 59 bytes

$args-match'\w'|%{"$_"|% *l*r}|group|%{,($_.Name,$_.Count)}

Try it online!

Down to 59 bytes using splatting

$args-match'\w' # For each character argument, exclude non letters characters
|%{"$_"|% *l*r} # Converts to lowercase
|group # Groups them
|%{,($_.Name,$_.Count)} # build pairs of letters and counts
Source Link
Julian
  • 3.4k
  • 8
  • 19

PowerShell Core, 63 bytes

$args|% *l*r|% t*y|?{$_-match'\w'}|group|%{,($_.Name,$_.Count)}

Try it online!

$args|% *l*r # For each string argument, lowercase it
|% t*y # Split it in characters
|?{$_-match'\w'} # Excludes non letters characters
|group # Groups them
|%{,($_.Name,$_.Count)} # build pairs of letters and counts

AltStyle によって変換されたページ (->オリジナル) /