Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

JPinkman

  • 3 years ago

How can I convert this piece of code [ http://pastebin.com/SM7ZHxK9 ] for finding a string within a string, so that it can find multiple occurences, eg "a" in "abraham" occuring at indeces 0, 3,5, with each index being saved to a seperate eg. a = 0 b = 3, c =5 (I need this so I can return the occurences from a function)

  • This Question is Closed
  1. KonradZuse
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    you can use Char which finds characters, or use delimeters to find certain strings.

  2. rsmith6559
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Take the return statement out of the the loop and do it after the loop.

  3. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy