Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在研究一些 ruby 代码,我看到这个“varx”变量与 [0x140,4] <- 这是什么意思?我找不到任何显示这一点的 ruby 文档。varx 类似于二进制字符串。
varx[0x140, 4] = [0x4a8acb38 - 0x1c].pack('V')
它正在用从 RHS 端返回的数据替换varx从索引 0x140 开始的4 个“事物” 。varx
varx
例子:
s="my name is prince"; s[11,6] = "John"; s => "my name is John"