Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Post History

71%
+3 −0
Challenges Abbreviate everything

Challenge Make a program that takes input of a string and abbreviate it. All letters of an abbreviation are capitalized, so keep that in mind. Whitespace, numbers and non-English characters ar...

3 answers  ·  posted 2y ago by General Sebast1an‭  ·  last activity 2y ago by Hakerh400‭

Question code-golf string
#2: Post edited by user avatar General Sebast1an‭ · 2021-09-13T11:37:34Z (over 2 years ago)
  • > This challenge is currently under beta release. If given enough positivity, it will remain here and stand as a fully released challenge. Otherwise, it will be deleted and put back in the [sandboxed post](https://codegolf.codidact.com/posts/283799). Please fix the errors there instead.
  • # Challenge
  • Make a program that takes input of a string and abbreviate it.
  • - All letters of an abbreviation are capitalized, so keep that in mind.
  • - Whitespace, numbers and non-English characters are ignored.
  • - If the inputted string is a paragraph (2+ sentences), the abbreviation will be split by spaces (` `) where `.`, `?` or `!` are, while commas (`,`) are ignored in this splitting scenario.
  • - Words that are connected by hyphens (`-`) will result to only one letter.
  • - The only non-alphabetical characters to remain in the result are colons (`:`) and semicolons (`;`).
  • - This is <a class="badge is-tag">code-golf</a>, so shortest program in each language wins.
  • # Test Cases
  • ```none
  • // Input
  • # Output
  • Hello, World!
  • HW
  • Can you make me a sandwich?
  • CYMMAS
  • hyper-neutrino
  • H
  • Too long; didn't read
  • TL;DR
  • I studied, don't worry. I will pass.
  • ISDW IWP
  • What???!?!
  • W
  • Get me 99 bottles of beer, bro!
  • GMBOBB
  • ```
  • # Challenge
  • Make a program that takes input of a string and abbreviate it.
  • - All letters of an abbreviation are capitalized, so keep that in mind.
  • - Whitespace, numbers and non-English characters are ignored.
  • - If the inputted string is a paragraph (2+ sentences), the abbreviation will be split by spaces (` `) where `.`, `?` or `!` are, while commas (`,`) are ignored in this splitting scenario.
  • - Words that are connected by hyphens (`-`) will result to only one letter.
  • - The only non-alphabetical characters to remain in the result are colons (`:`) and semicolons (`;`).
  • - This is <a class="badge is-tag">code-golf</a>, so shortest program in each language wins.
  • # Test Cases
  • ```none
  • // Input
  • # Output
  • Hello, World!
  • HW
  • Can you make me a sandwich?
  • CYMMAS
  • hyper-neutrino
  • H
  • Too long; didn't read
  • TL;DR
  • I studied, don't worry. I will pass.
  • ISDW IWP
  • What???!?!
  • W
  • Get me 99 bottles of beer, bro!
  • GMBOBB
  • ```
#1: Initial revision by user avatar General Sebast1an‭ · 2021-09-11T03:44:52Z (over 2 years ago)
Abbreviate everything
> This challenge is currently under beta release. If given enough positivity, it will remain here and stand as a fully released challenge. Otherwise, it will be deleted and put back in the [sandboxed post](https://codegolf.codidact.com/posts/283799). Please fix the errors there instead.

# Challenge

Make a program that takes input of a string and abbreviate it.

- All letters of an abbreviation are capitalized, so keep that in mind.
- Whitespace, numbers and non-English characters are ignored.
- If the inputted string is a paragraph (2+ sentences), the abbreviation will be split by spaces (` `) where `.`, `?` or `!` are, while commas (`,`) are ignored in this splitting scenario.
- Words that are connected by hyphens (`-`) will result to only one letter.
- The only non-alphabetical characters to remain in the result are colons (`:`) and semicolons (`;`).
- This is <a class="badge is-tag">code-golf</a>, so shortest program in each language wins.

# Test Cases
```none
// Input
# Output

Hello, World!
HW

Can you make me a sandwich?
CYMMAS

hyper-neutrino
H

Too long; didn't read
TL;DR

I studied, don't worry. I will pass.
ISDW IWP

What???!?!
W

Get me 99 bottles of beer, bro!
GMBOBB
```