Hii All,
I want to add space between the string and first letter in upper case like:
firstName : First Name
lastName : Last Name
Thanks
Discussion posts and replies are publicly visible
There are a lot of questions you'd need to answer before anyone can give you a strong answer here.
Are you talking about a rule that would take one string (any string) as an input, and return an output where space(s) have been added?
What is the full range of acceptable inputs? Is it just "firstName" and "lastName", or is it literally any string? What would the expected result be if the input has no uppercase characters? What would the expected result be if the input is only uppercase characters? And all permutations between those possibilities?
Hi jojog0003
Please use this expression to get the expected output
a!localVariables( local!letter: "firstName", local!a: joinarray( a!forEach( items: enumerate(len(local!letter)) + 1, expression: if( exact( fn!mid(local!letter, fv!index, 1), upper(fn!mid(local!letter, fv!index, 1)) ), concat(" ", fn!mid(local!letter, fv!index, 1)), fn!mid(local!letter, fv!index, 1) ) ), "" ), proper(local!a))