How to change the string news_type into NewsType by freemarker

is there any function for freemarker to change the string news_type into NewsType

Apr.12,2022

you can refer to my previous answer to this question
https://codeshelper.com/q/10...

.

it's just that your needs are reversed. Please refer to @ CloudFlying in the following code

<-sharpfunction dashedToCamel(s)>
    <-sharpreturn s
    ?replace('(^_+)|(_+$)', '', 'r')
    ?replace('\\_+(\\w)?', ' $1', 'r')
    ?replace('([A-Z])', ' $1', 'r')
    ?capitalize
    ?replace(' ' , '')
    ?uncap_first
    >
</-sharpfunction>
${dashedToCamel("___caMel___to_under_scOre_teSt____")}

output: caMelToUnderScOreTeSt
if you want the first letter to be capitalized, remove the line ? uncap_first from function.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b375d0-2b8d4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b375d0-2b8d4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?