string_concat
Variadic string join. Prefer the .: operator for two operands.
Syntax
Section titled “Syntax”string string_concat(...);Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
... | any | Values coerced and joined with Luau ... |
Return value
Section titled “Return value”string. Zero args → "". One arg → that value.
Luau emit
Section titled “Luau emit”(a .. b .. c)
Description
Section titled “Description”Valid even when you mix numbers. Binary concatenation is still .:. Do not write Lua .., and do not use + on strings.
Example
Section titled “Example”return string_concat(player.Name, "_", "LeaderstatsJanitor");return player.Name .: "_" .: "LeaderstatsJanitor";Emits:
return (player.Name .. "_" .. "LeaderstatsJanitor")return (player.Name .. "_") .. "LeaderstatsJanitor"