The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Teaser

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Teaser Posted: Sep 3, 2004 2:46 PM
Reply to this message Reply

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
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Travis Griggs - Blog

Advertisement
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.

'TheNextBIGThing' --> #('The' 'Next' 'BIG' 'Thing')
'USAHockeyTeam' --> #('USA' 'HockeyTeam')
'riseOfAARP' --> #('rise' 'Of' 'AARP')

Read: Teaser

Topic: Interesting reaction Previous Topic   Next Topic Topic: OO Education in Ottawa

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use