Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339014 - [EOL] Collection#concat/0 (was Collection#join)
Summary: [EOL] Collection#concat/0 (was Collection#join)
Status: CLOSED FIXED
Alias: None
Product: Epsilon
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Louis Rose CLA
QA Contact:
URL:
Whiteboard: interim
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-05 14:29 EST by Louis Rose CLA
Modified: 2012-02-06 10:59 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Louis Rose CLA 2011-03-05 14:29:29 EST
I've been using a Collection#join method for a lot of EGL templates, and I think it's time to promote it to a built-in method in EOL:

var s = Sequence{'foo','bar','baz'}

s.join() -> 'foobarbaz'
s.join('-') -> 'foo-bar-baz'

Collection#join(pattern) is the inverse of String#split(pattern)
Comment 1 Louis Rose CLA 2011-03-05 14:41:41 EST
I've added join to CollectionOperationContributor, added some tests to CollectionTests and updated the Epsilon book.

Assigning to Dimitris for build integration; thanks!
Comment 2 Louis Rose CLA 2011-03-17 11:17:28 EDT
In fact, there is already a concat operator that is equivalent to join/1.

I've removed join/0 and join/1 and added concat/0.
Comment 3 Louis Rose CLA 2011-06-01 14:20:51 EDT
This was fixed no later than interim build 0.9.0.201104180016.
Comment 4 Dimitris Kolovos CLA 2011-07-25 08:16:46 EDT
Fixed in 0.9.1