LiquidJS

教程标签过滤器演示API
Github Support
概述absappendat_leastat_mostcapitalizeceilcompactconcatdatedefaultdivided_bydowncaseescapeescape_oncefirstfloorjoinjsonlastlstripmapminusmodulonewline_to_brplusprependrawremoveremove_firstremove_lastreplacereplace_firstreplace_lastreverseroundrstripsizeslicesortsort_naturalsplitstripstrip_htmlstrip_newlinestimestruncatetruncatewordsuniqupcaseurl_decodeurl_encodewhere

abs

v1.9.1

返回数字的绝对值。

输入

{{ -17 | abs }}

输出

17

输入

{{ 4 | abs }}

输出

4

对于只包含数字的字符串也好使:

输入

{{ "-19.86" | abs }}

输出

19.86
上次更新:2023-01-02 上一页下一页
目录
回到顶部
© 2023 Harttle
本文档通过 CC BY 4.0 授权。
    教程标签过滤器演示API
概述absappendat_leastat_mostcapitalizeceilcompactconcatdatedefaultdivided_bydowncaseescapeescape_oncefirstfloorjoinjsonlastlstripmapminusmodulonewline_to_brplusprependrawremoveremove_firstremove_lastreplacereplace_firstreplace_lastreverseroundrstripsizeslicesortsort_naturalsplitstripstrip_htmlstrip_newlinestimestruncatetruncatewordsuniqupcaseurl_decodeurl_encodewhere