Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339014

Summary: [EOL] Collection#concat/0 (was Collection#join)
Product: [Modeling] Epsilon Reporter: Louis Rose <louis>
Component: CoreAssignee: Louis Rose <louis>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard: interim

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