java - How to convert a string to camel case in phpstorms (velocity based) file tempates? -



java - How to convert a string to camel case in phpstorms (velocity based) file tempates? -

what i've tried far is:

## $name 'my_controller_c' #set($name = $name.removeandhump($name)) #set($name = $name.underscorestocamelcase(string)

but not work. first 1 nothing, sec 1 throws java error.

i tried using regular expressions , loop through string, java knowledge basic.

this is, ended doing:

#set($ctrlname = $name.replaceall("-c$", "")) #set($ctrlnewname = "") #foreach($str in $ctrlname.split("-")) #set($str = $str.substring(0,1).touppercase()+$str.substring(1)) #set($ctrlnewname = $ctrlnewname + $str) #end #set ( $ctrlnewname = $ctrlnewname + "ctrl" )

java intellij-idea phpstorm velocity

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -