want to display dynamic field name on screen but with updating initial as capital and adding one space in between.Field name always start with small caps
eg. "indiaChinaFrance" to "India China France"
eg. abcDefXyz to "Abc Def Xyz"
Discussion posts and replies are publicly visible
Could not hold me back. My looping function solution.I am sure Mike will love it ;-)
a!localVariables( local!input: "indiaChinaFrance", proper( reduce( substitute(_, _, _), local!input, merge( char(65+enumerate(26)), apply(concat(" ", _), char(65+enumerate(26))) ) ) ) )
Stefaaaaaan I am not mike, but I remember during our last call I mentioned the factor of maintainability regarding coding :D perhaps that is the most elegant way of all the above, but absolutly hell for people who shall maintain that. "reduce" in combination of merge and on top (multiple) "_" is definitly not inituive to read....
#JobSecurity
It is a beautiful piece of code though! Not sure I even knew the proper() function existed until now..
Might as well include my solution here also
a!localVariables( local!input: "indiaChinaFrance", joinarray( a!forEach( items: enumerate(len(local!input)), expression: a!localVariables( local!char: charat(local!input,fv!index), if( fv!isFirst, upper(local!char), if( code(local!char)<97, concat(" ",local!char), local!char ) ) ) ) ) )
index( index( index( reduce( merge( apply( index( if( merge( merge( ...
*shudder*