Write a program to elasticize strings

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

DECLARE @x varchar(max)='Lobby'

DECLARE @ INT=LEN(@x)WHILE @>0SELECT
@x=STUFF(@x,@,1,REPLICATE(SUBSTRING(@x,@,1),@)),@-=1PRINT @x

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results