Live Template Expression: toLowerCase

I need to convert a Live Template variable (that is its value) to lower-case.

e.g.
user input vor VAR1:  thisIsMyValue
value of VAR2: thisismyvalue

I need both values in the Live Template.

In "Edit Variables" I have built-in expressions such as capitalize, is there any way to call a custom function, or a standard JavaScript function?

Appreciate any input!

mberrie



Attachment(s):
screenshot.png
0
4 comments

Hello!

there is a decapitalize(<name>) function - see http://www.jetbrains.com/webstorm/webhelp/edit-template-variables-dialog.html
Custom functions are supported in IntellijIdea via groovy script macro, but this feature is not a part of WebStorm/PHPStorm

0

Is it still the case in 2019 that PHPStorm offers a poor, limited subset of string manipulation functions for Live Templates and no way to extend it?

0
underscoresToCamelCase(<name>)

This will do exactly what you need.

0

Please sign in to leave a comment.