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

Commonmark migration
Source Link

#PowerShell, 81 Bytes

PowerShell, 81 Bytes

(-join($args[0].Split(" ")|?{$_-notmatch"^(and|or|by|of)$"}|%{$_[0]})).ToUpper()

Explanation

Split on the spaces creating an array. Drop the offending members. Pull the first character and join together. Use ToUpper() on the resulting string.

#PowerShell, 81 Bytes

(-join($args[0].Split(" ")|?{$_-notmatch"^(and|or|by|of)$"}|%{$_[0]})).ToUpper()

Explanation

Split on the spaces creating an array. Drop the offending members. Pull the first character and join together. Use ToUpper() on the resulting string.

PowerShell, 81 Bytes

(-join($args[0].Split(" ")|?{$_-notmatch"^(and|or|by|of)$"}|%{$_[0]})).ToUpper()

Explanation

Split on the spaces creating an array. Drop the offending members. Pull the first character and join together. Use ToUpper() on the resulting string.

Rollback to Revision 2
Source Link
Matt
  • 1.1k
  • 12
  • 14

#PowerShell, 7781 Bytes

(-join($args[0].Split(" ")|?{!($_-match"and|or|by|of"notmatch"^(and|or|by|of)$"}|%{$_[0]})).ToUpper()

Explanation

Split on the spaces creating an array. Drop the offending members. Pull the first character and join together. Use ToUpper() on the resulting string.

#PowerShell, 77 Bytes

(-join($args[0].Split(" ")|?{!($_-match"and|or|by|of")}|%{$_[0]})).ToUpper()

Explanation

Split on the spaces creating an array. Drop the offending members. Pull the first character and join together. Use ToUpper() on the resulting string.

#PowerShell, 81 Bytes

(-join($args[0].Split(" ")|?{$_-notmatch"^(and|or|by|of)$"}|%{$_[0]})).ToUpper()

Explanation

Split on the spaces creating an array. Drop the offending members. Pull the first character and join together. Use ToUpper() on the resulting string.

deleted 4 characters in body
Source Link
Matt
  • 1.1k
  • 12
  • 14

#PowerShell, 8177 Bytes

(-join($args[0].Split(" ")|?{!($_-notmatch"^(and|or|by|ofmatch"and|or|by|of")$"}|%{$_[0]})).ToUpper()

Explanation

Split on the spaces creating an array. Drop the offending members. Pull the first character and join together. Use ToUpper() on the resulting string.

#PowerShell, 81 Bytes

(-join($args[0].Split(" ")|?{$_-notmatch"^(and|or|by|of)$"}|%{$_[0]})).ToUpper()

Explanation

Split on the spaces creating an array. Drop the offending members. Pull the first character and join together. Use ToUpper() on the resulting string.

#PowerShell, 77 Bytes

(-join($args[0].Split(" ")|?{!($_-match"and|or|by|of")}|%{$_[0]})).ToUpper()

Explanation

Split on the spaces creating an array. Drop the offending members. Pull the first character and join together. Use ToUpper() on the resulting string.

added 4 characters in body
Source Link
Matt
  • 1.1k
  • 12
  • 14
Loading
Source Link
Matt
  • 1.1k
  • 12
  • 14
Loading

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