to_s

fix.to_s(base=10) â string
Instance Public methods

Returns a string containing the representation of fix radix base (between 2 and 36).

1
2
3
4
5
6
12345.to_s       #=> "12345"
12345.to_s(2)    #=> "11000000111001"
12345.to_s(8)    #=> "30071"
12345.to_s(10)   #=> "12345"
12345.to_s(16)   #=> "3039"
12345.to_s(36)   #=> "9ix"

inspect

doc_ruby_on_rails
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.