splitWithin: ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

splitWithin: ?

Stéphane Ducasse
Hi 

We have splitOn: 

'| a b | c d |' splitOn: ‘|'
>> an OrderedCollection('' ' a b ' ' c d ' ‘')

And I think that it would be nice to have 

'| a b | c d |' splitWithin: ‘|'
>> an OrderedCollection(' a b ' ' c d ' )

Do you have idea?
S. 
--------------------------------------------
Stéphane Ducasse
03 59 35 87 52
Assistant: Julie Jonas 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France

Reply | Threaded
Open this post in threaded view
|

Re: splitWithin: ?

Carlo-2
Similar to current String>>#findTokens: ?

'| a b | c d |'  findTokens: '|'.
>> an OrderedCollection(' a b ' ' c d ')

'| a b | c d |||'  findTokens: '|'.
>> an OrderedCollection(' a b ' ' c d ')


On 16 May 2020, at 20:04, Stéphane Ducasse <[hidden email]> wrote:

Hi 

We have splitOn: 

'| a b | c d |' splitOn: ‘|'
>> an OrderedCollection('' ' a b ' ' c d ' ‘')

And I think that it would be nice to have 

'| a b | c d |' splitWithin: ‘|'
>> an OrderedCollection(' a b ' ' c d ' )

Do you have idea?
S. 
--------------------------------------------
Stéphane Ducasse
03 59 35 87 52
Assistant: Julie Jonas 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France