巴克励步
发布于:2025-01-02
{{ "Ground control to Major Tom." | truncatewords: 3 }}
Ground control to...
truncatewords 还支持第二个可选参数,用于指定一个字符序列,此字符序列将被添加到截短字符串的后面。默认是省略号(…),但是你可以按照你的需要传递一个新的。{{ "Ground control to Major Tom." | truncatewords: 3, "--" }}
Ground control to--
truncatewords 的第二个参数设置为空字符串:{{ "Ground control to Major Tom." | truncatewords: 3, "" }}
Ground control to