Shortening list of numbers with hyphens between consecutive numbers

后端 未结 2 1836
星月不相逢
星月不相逢 2020-12-16 06:45

Is there a simple way to take a list of numbers which can be in the range 1 - 15. And put a dash in place of consecutive numbers.

So that for example if you had the

2条回答
提交回复
热议问题