Mega Code Archive

 
Categories / Ruby / String
 

The string contains 6 bytes which encode 5 characters

s = "2×2=4" s.length        # => 5: Characters:  '2'   '×'   '2'   '='   '4' s.bytesize      # => 6: Bytes (hex): 32   c3 97  32    3d    34