in UnCamelCase Challenge ::
While I'm testing and preparing to post the results of the UnCamelCase Challenge, I've run into a small problem :(
What do you expect the result of the UnCamelCase function should be when the string provided is "UnCamelCaseTHISString"?
I have already received more than 50 submission. Some algorithms are fast, some slow, some in a few lines of code, some are "big". Some will be published, some not. BUT, I do have a problem, since I have (obviously) not provided clear instructions for the algorithm .. but that's life :)
Anyway, what do you think the result should be in this case:


‘Un Camel Case THIS String’?
While you’re iterating, assume that adjacent uppercase letters form a word, until a lowercase letter is found, in which case, reverse a character and split…no?
Obviously it would all depend on how you’ve implemented the original algorithm.
Your sample is not defined as a camel case: “UnCamelCaseTHISString”.
It should be “UnCamelCaseThisString” as you defined it to be in the challenge. The challenge is to uncamel case camel descriptions, which should be as it is intended.
@Henk: yep, you’re, in essence, right. However, things happen and I wanted to see what other think of “UnCamelCaseTHISString”
Zarko, “UnCamelCaseTHISString” is a poorly formatted CamelCase string and should be treated following the rules of GIGO [Garbage In Garbage Out] where the result is:
‘Un Camel Case T H I S String”
Just the same as this input would be:
DidTheProcessWork???
My opinion.
I ran into that decision problem as well. Even with the example ILoveDelphi.
IsThisAValidALC would translate into Is-This-A-Valid-A-L-C. Coding, I know ALC is an acronym, but having code realize whats a word, what is an acronym should be out of the scope of this challenge.
UnCamelCaseTHISString will theoretically never process right unless we put a dictionary function into the algorithm. My understanding is that we use CamelCase to make variables readable by substituting caps for spaces.
There are a few cases where CamelCase just doesn’t work out. I have many functions named “EncodeHex”, “HextoFloat”, etc, that work out great. But sometimes I hit a funny one, such as calculating a CRC value. We all recognize CRC as an uppercase abbreviation. Should the CamelCase form be “CRCCalculate”, “CrcCalculate”, or “crcCalculate”? Regardless of what format I choose, I personally would only define CrcCalculate as proper CamelCase, trading caps for spaces.
Another valid point, in my opinion, is that if you plan to allow for edge case situations then you must allow for all lower case as well.
The invalid CamelCase “ValidUpperAplhaDtoG” has to come out:
“Valid Upper Aplha D to G”
and not:
“Valid Upper Aplha Dto G”
Edge cases should be considered beyond the scope of the challenge. It would be fun though … using sets of allowable edge case works/acronyms. Certainly doable.
–
Dave
uncamelcasethisstring
for sure there are some examples that are not covered by all algorithms.
For example, if the CamelCaseWord ends with a capital letter like
ILoveDelphiSaidI