why int.str() but rune.string() ? #23712
-
int cast to srt insted i expect ps. |
Beta Was this translation helpful? Give feedback.
Answered by
JalonSolov
Feb 13, 2025
Replies: 2 comments 1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
.string()
(as documented), turns arune
array back into a string..str()
is the default method of turning an array into a printable format - AS AN ARRAY.Not specifying any method when printing an array is the same as calling the
.str()
method on the array - it is the default method.That's exactly what is shown in your example.
The documentation could, perhaps, be made better, to make these distinctions more clear.