Skip to content

Commit

Permalink
Merge pull request JuliaLang#9159 from lucasb-eyer/join-doc
Browse files Browse the repository at this point in the history
Document `join`'s optional `last` parameter.
  • Loading branch information
ivarne committed Nov 27, 2014
2 parents 9311dbd + 6ee0fcb commit ee6d56f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions doc/stdlib/base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1506,9 +1506,13 @@ Strings

Returns ``string`` with the first character converted to lowercase.

.. function:: join(strings, delim)
.. function:: join(strings, delim, [last])

Join an array of strings into a single string, inserting the given delimiter between adjacent strings.
Join an array of ``strings`` into a single string, inserting the given delimiter between adjacent strings.
If ``last`` is given, it will be used instead of ``delim`` between the last two strings.
For example, ``join(["apples", "bananas", "pineapples"], ", ", " and ") == "apples, bananas and pineapples"``.

``strings`` can be any iterable over elements ``x`` which are convertible to strings via ``print(io::IOBuffer, x)``.

.. function:: chop(string)

Expand Down

0 comments on commit ee6d56f

Please sign in to comment.