capfirst 过滤器可以将英文字符串第一个字母转换为大写。只有英文字母会被转换。
lower 过滤器可以将英文字符串中所有的字母转换成小写。
upper 过滤器可以将英文字符串中所有的字母转换成大写。
title 过滤器可以将英文字符串中所有的单词的首字母转换成大写。
capfirst 过滤器的使用方法:
}
lower 过滤器的使用方法:
}
upper 过滤器的使用方法:
}
title 过滤器的使用方法:
}
比如将 hello there! 中的第一个字母转换为大写,则可以这么写:
}显示结果
Hello there!
capfirst 过滤器
} } } } }显示结果
H Hello there! 安企内容管理系统
lower 过滤器
} } } } } } }显示结果
h hello there! hello there! hello there! 你好世界
upper 过滤器
} } } } } } }显示结果
H HELLO THERE! HELLO THERE! HELLO THERE! 你好世界
title 过滤器
} } } } } } }显示结果
H Hello There! Hello There! Hello There! 你好世界