Skip to content

Bucket:ReplaceKeys()

paige edited this page Aug 17, 2023 · 1 revision
  • desc: replaces mentions of a given string in keys
  • returns: Bucket: Table
  • args: From: String, To: String
  • note: clones the original bucket
local bucket = Bucket.new({ "abc 123", { ["abc 123"] == "abc 123"} })

-- doesn't change the values because they're separate
bucket:ReplaceKeys("123", "def") -- (( "abc 123", [ *abc def => "abc 123" ] ))

Clone this wiki locally