This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: Teaser
Feed Title: Travis Griggs - Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/travis-rss.xml
Feed Description: This TAG Line is Extra
I have a string operation I want to do. I can write the brute force code to do it. But there's something in me that wants to find the tricky/elegant/terse/cool way of doing it, rather than the brute force loop. I haven't really come up with anything that even comes close to a "one liner" yet. Can you?
The problem is this. Parse camelCase, but with a twist. Given the string 'CamelCase' or 'camelCase', its pretty easy to break into a collection of two strings, containing 'camel' and 'Case'. The twist is to deal with runs of uppercase abbreviations as one word. Here's some examples and their output.