扩展Groovy String类

Mar*_*ark 6 groovy frontend template-engine extend

Groovy允许在前端页面中使用字符串做一些很好的事情,例如:

${"hello".capitalize()}

如何在String课程中添加新的自定义方法?喜欢:

${"hello".custom()}