简体   繁体   English

我可以按前缀获取密钥,然后将其删除吗?

[英]Can I fetch keys by prefix and then delete them?

I can use fwmkeys to iterate over keys that share a prefix -- but how can I modify these keys as I iterate? 我可以使用fwmkeys遍历共享前缀的密钥-但是如何在迭代时修改这些密钥? In my case I only need to be able to delete them or set them to empty, either will work. 在我的情况下,我只需要删除它们或将它们设置为空即可。

Oh, I see. 哦,我明白了。 fwmkeys returns the key strings, so I can then operate directly on them that way. fwmkeys返回键字符串,因此我可以直接对它们进行操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM