如何在 loop 中使用 trimLeft 中? #26
Answered
by
jiacai2050
jiacai2050
asked this question in
新手提问
-
This snippet will report If I change
I couldn't understand how to use trimLeft inside a loop, since both its input and output is const, how could I trim a value cascadingly? Source |
Beta Was this translation helpful? Give feedback.
Answered by
jiacai2050
Sep 18, 2022
Replies: 1 comment
-
在 ziggit 上已经有人回复了,答案也很简单:
之前主要是搞混淆了 const 的位置,
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jiacai2050
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在 ziggit 上已经有人回复了,答案也很简单:
之前主要是搞混淆了 const 的位置,
var line: []const u8
表示 line 可以改变指向const line: [] u8
表示 line 不可以改变指向,但是可以改变指向值的内容