longest icon indicating copy to clipboard operation
longest copied to clipboard

Multiple 'longest' element

Open JoaoGFarias opened this issue 6 years ago • 0 comments

Given the following array:

['hello', 'hellohello1','hello', 'hellohello2']

longest would return 'hellohello1', even though there are two 11-chars elements.

I would suggest adding a optional argument* that would allowed returning an array with all max-length elements.

* I think defaulting this argument to return an array is better, but defaulting to single return is reasonable as well.

JoaoGFarias avatar Aug 21 '17 16:08 JoaoGFarias