Skip to main content
added 389 characters in body
Source Link
Galen Ivanov
  • 21.2k
  • 3
  • 24
  • 61

Red, 51 bytes

func[s][copy/part t: append copy s s find next t s]

Try it online!

A Red port of xnor's Python solution. Don't forget to upvote his answer!

Using parse:

Red, 71 bytes

func[s][n: 0 until[n: n + 1 parse s[copy t n skip any t]]copy/part s n]

Try it online!

Red, 51 bytes

func[s][copy/part t: append copy s s find next t s]

Try it online!

A Red port of xnor's Python solution. Don't forget to upvote his answer!

Red, 51 bytes

func[s][copy/part t: append copy s s find next t s]

Try it online!

A Red port of xnor's Python solution. Don't forget to upvote his answer!

Using parse:

Red, 71 bytes

func[s][n: 0 until[n: n + 1 parse s[copy t n skip any t]]copy/part s n]

Try it online!

Source Link
Galen Ivanov
  • 21.2k
  • 3
  • 24
  • 61

Red, 51 bytes

func[s][copy/part t: append copy s s find next t s]

Try it online!

A Red port of xnor's Python solution. Don't forget to upvote his answer!