我想删除字节数组的最后一个元素
但这些方法似乎都不受支持
def test = 'test.com'
print test.bytes.removeLast()
print '\n'
print test.bytes.dropRight(0)
这些是数组,它们在 Groovy 中根本没有太多功能。您可以将它们转换为列表.toList()
groovy:000> test.bytes.toList().removeLast()
===> 109
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句