在clojure中,以引导0s的速度传递数字会导致奇怪的行为。这是什么功能?
因此,我在玩一些琴弦时不小心弄清楚了这一点。
(str 111) => "111"
(str 0111) => "73"
这是什么?
So, I accidentally figured this out while playing around with some strings.
(str 111) => "111"
(str 0111) => "73"
What is this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以
0
为前缀的数字为 Octal :数字 : 是 hexadecimal :
数字以
xr
前缀为xr ,其中x是2到36的数字,有一个radix:如果要与零一起使用零,请参见
格式
或cl-format
:
Numbers prefixed with
0
are octal:Numbers prefixed with
0x
are hexadecimal:Numbers prefixed with
Xr
, where X is number from 2 to 36, have that radix:If you want to pad number with zeros, see
format
orcl-format
: