Ruby - Convert Integer to String

前端 未结 7 1177
孤独总比滥情好
孤独总比滥情好 2021-01-17 11:28

In Ruby, trying to print out the individual elements of a String is giving me trouble. Instead of seeing each character, I\'m seeing their ASCII values instead:

<         


        
相关标签:
7条回答
  • 2021-01-17 11:53

    @Chris,

    That's just how [] and [,] are defined for the String class.

    Check out the String API.

    0 讨论(0)
提交回复
热议问题