Skip to main content
1 of 2
emanresu A
  • 44.4k
  • 5
  • 101
  • 240

Vyxal, 8 bytes

ṘKRṘ=ƛTh

Try it Online!

ṘKRṘ     # Over suffixes...
    =    # Check if each value is equal to the second input
     ƛ   # Map...
      Th # Find the first index where it is equal
emanresu A
  • 44.4k
  • 5
  • 101
  • 240