Difference between revisions of "Join"

From MiniScript Wiki
Jump to navigation Jump to search
m (JoeStrout moved page Self.join to Join without leaving a redirect)
Line 11: Line 11:
 
| ''self'' || list || list to join
 
| ''self'' || list || list to join
 
|-
 
|-
| ''delimiter'' || string, default "" || string to insert between each pair of elements.
+
| ''delimiter'' || string, default " " || string to insert between each pair of elements.
 
|}
 
|}
  

Revision as of 17:05, 15 August 2022

self.join joins the elements of a list together to form a string.

See also: split

Arguments

Parameter Name Default Value Meaning
self list list to join
delimiter string, default " " string to insert between each pair of elements.

Example

[2,4,8].join("-")		// returns "2-4-8"