WoW:API strjoin: Difference between revisions

m
Move page script moved page API strjoin to WoW:API strjoin without leaving a redirect
mNo edit summary
m (Move page script moved page API strjoin to WoW:API strjoin without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Stub/API}}
{{wowapi}}
strjoin(delimiters, string, string,...)
Joins strings together with a delimiter. (An alias with string.join)
local joinedString = strjoin(delimiter, string, string,...)


-delimiters is the charcter , such as " ", "/","."


Example:
== Arguments ==
:("delimiter", "string1", "string2",...)


a=strjoin("/", "HE", "LLO");
:;delimiter : String - The delimiter to use between each string being joined.
SendChatMessage(a,"say");
:;string1 : String - The first string being joined.
:;string2 : String - The second string being joined.


output:
 
HE/LLO
== Returns ==
:;joinedString : String - A string containing all the string arguments with the delimiter between each one.
 
 
== Example ==
 
a = strjoin("/", "HE", "LL", "O");
SendChatMessage(a, "say");
 
<big>'''Result'''</big>
HE/LL/O
 
 
== Notes ==
 
In patch 3.1, string.join is an alias for strjoin (they point to the same function).
Anonymous user