このような配列の例を考えると:
idx = [ 0xe, 0x3, 0x6, 0x8, 0x2 ]
Objective Cで指定された各項目の整数と文字列の表現を取得したいのですが、完全に機能するルビーの例をモックアップしました。
0xe gives 14 when i run 0xe.to_i and "e" when i run to_i(base=16)
0x3 gives 3 when i run 0x3.to_i and gives 3 when i run to_i(base=16)
Objective Cでこれをどのように達成できますか?