int
少于1分钟
将以下英文翻译为中文:
int
https://gohugo.io/functions/int/
Casts a value to a decimal (base 10) integer.
语法
int INPUT
With a decimal (base 10) input:
| |
With a binary (base 2) input:
| |
With an octal (base 8) input (use either notation):
| |
With a hexadecimal (base 16) input:
| |
Values with a leading zero are octal (base 8). When casting a string representation of a decimal (base 10) number, remove leading zeros:
{{ strings.TrimLeft "0" "0011" | int }} → 11
另请参阅
最后修改 June 1, 2023: 新增一个配置参数:sidebar_menu_truncate = 500 用于解决菜单不全的问题 (27810f1)