Problem 1641. ABBREVIATION
Abbreviate the given string. Consider Only Capital Letters.
EXAMPLE
If input is 'Abbreviation of The Given String' then output should be 'A T G S '. Note: There should be a space at the end of the abbreviated word.
Solution Stats
Problem Comments
-
3 Comments
James
on 17 Jun 2013
In the swecond test case, you have:
x ='The Propose is to Make ABBREBIATION';
y_correct = 'T P M A ';
Are "is" and "to" to be ignored, or should the rule be "Only abbreviate words that begin with capital letters?"
Marco Riani
on 1 May 2021
In this problem it is assumed that every word in the input string with more than two letters starts with an uppercase letter. All the test cases in the examples have this convention.
Robert Wagner
on 2 Feb 2024
I hate regexes because I cannot handle them :-)
Solution Comments
Show commentsGroup

Strings II
- 21 Problems
- 41 Finishers
- Eliminate Polysyllabics: Long live short words!
- Alternately upper-lower case
- Morse Code Generator! Try it!
- Is the paranthesis sequence balanced ?
- Simple Decoder Ring
- Join Strings with Multiple Different Delimiters
- Is the paranthesis sequence balanced ?
- Count letters occurence in text, specific to words with a given length.
- Convert Two Character String into a Binary Vector
- Kryptos - CIA Cypher Sculpture: Vigenere Encryption
- Kryptos - CIA Cypher Sculpture: Vignere Decryption
- Mean and standard deviation of times in string
- How many digits are there?
- ABBREVIATION
- Make a list string
- Generate a melodic contour string matrix
- Morse Code Generator! Try it!
- NO _________ ALLOWED....
- Backslang, odds are you used it at some point in time...
- Simple Caesar Cypher - shift encrypt a message given an index number
- Split a given string from the first instance of a given character
- Concatenate strings
- most frequent character
- Alternately upper-lower case
Problem Recent Solvers124
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!