Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 04, 2016, 02:16:10 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Use Batch Script to create an acronym from a variable  (Read 269 times)

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 510
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Use Batch Script to create an acronym from a variable
« on: October 31, 2016, 05:34:39 PM »
The Variable is made up of one or more words separated by spaces.

The resulting acronym cannot be more than 8 characters in length and must contain at least the first letter from each word in the input.

If the Input was "president" the output would be "presiden" not just the letter "p". 
If the input was "president and chairperson" the output would be "pranch".

If the input was "chief cook and bottle washer" the acronym would be "ccabw" but
if the input was "cook and bottle washer"  the acronym would be coanbowa.

Is there a relatively simple way to accomplish this using a for/to loop?