Check if before the last / there are an n

Hey

How i can check if before the last / there are an n
For exemple if i have “testn/tes t/ testn” it return false but if i have “test/help n/ exemple” it retrurn true

  1. Reverse the string
  2. find first /
  3. check if next char is n

Alternatively iterate from the back rather than from front.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.