Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document join's optional last parameter. #9159

Merged
merged 1 commit into from
Nov 27, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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