Page 1 of 1
Setting a word to sentence-case
Posted: 11 Apr 2023 20:22
by Gary_G
Does FH7 have a way to set just the initial character of a meta-field string to upper case and the rest to lower case?
RootsMagic has this and some templates that are converted to FH7 do not look "right" without it.
Re: Setting a word to sentence-case
Posted: 11 Apr 2023 20:49
by tatewise
There is no single function but the following does achieve that objective:
<{=ToUpper( LeftText( %SOUR.~TX-FIELD%, 1 ) )}{=ToLower( MidText( %SOUR.~TX-FIELD%, 2 ) )}>
Re: Setting a word to sentence-case
Posted: 11 Apr 2023 21:21
by Gary_G
Thanks, Mike;
It seems to come down to what we discussed a while ago.
FH7 is a slightly light string handling capabilities.
Not a big issue, but it can be an annoyance when one needs them.
Sort-of wish that FH7 had the ability to have add-on function-libraries written in LUA.
That would solve it all.
Re: Setting a word to sentence-case
Posted: 11 Apr 2023 21:55
by tatewise
See Wish List
Ref 547 Run Plugins via Expressions that requests exactly what you are asking for and has existed for over 6 years. Please Vote for it.
Re: Setting a word to sentence-case
Posted: 11 Apr 2023 23:01
by Gary_G
Thanks, Mike.
I'll put my check against that one. It would make sorely needed functions available and greatly shorten some constructs.