处理字符串的内建函数:
string内建函数:
substring:字符串截取,取头不取尾
cap_first:将首字母变大写
ends_with:以什么结尾
contains:是否包含目标字符串
date、datetime、time:将字符串转化成时间格式
starts_with:以什么开始
index_of:字符串或字符所在位置
last_index_of:字符串或字符最后出现的所在位置
split:分隔字符串
trim:把两头的空格去掉
round:四舍五入
floor:把小数点去掉
ceiling: 进一
string("0.##"):取小数点后两位
List内建函数:
first:取第一个值
last:取最后一个值
sequ_contains:判断这个序列是否包含
seq_index_of:这个序列所在位置
size:大小
reverse:反转
sort:排序
sort_by:根据某个字段排序
chunk:把列表进行分块处理
其他内建函数:
is_string:是不是字符串
is_number:是不是数字
is_method:是不是方法
has_content:判断对象是不是有值
其他内建函数
处理List的内建函数
处理数字的内建函数
处理字符串常见函数
字符串内建函数
?cap_first //首字母大写
?start_with
?ends_with
?split
?contains
?trim
?date //转换为date类型
?datetime
?time
处理数字的内建函数
x?string("0.##")
?round
?floor
?ceiling
处理listd的内建函数
?first
?last
?seq_contains
?seq_index_of
?reverse
?sort_by
?chunk 分块处理
其他内建函数
is函数:
?is_string
?is_number
?is_method
(),has_content函数 //将一个对象视为整体
eval //求值
SpingBoot设置首页:
@Controller //@RequestMapping("/") public class IndexController { @RequestMapping("/") public String TestIndexController(ModelMap modelMap) { modelMap.addAttribute("IndexText", "I am Index"); return "Index"; } }