Skip to content

Bucket:ReplaceVals()

paige edited this page Aug 17, 2023 · 2 revisions
  • desc: replaces mentions of a given string in values
  • 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 keys because they're separate
bucket:ReplaceVals("123", "def") -- (( "abc def", [ *abc 123 => "abc def" ] ))

Clone this wiki locally