Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - <b>name:</b> <b>stratnext() - get position of a substring in a string</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     stratnext() - get position of a substring in a string
  Usage:    <integer> = stratnext(<str1>,<str2>,<occurrence>)
  Params:   string <str1> - the string to search for
            string <str2> - the string to search in
            integer <occurrence> - the occurrence of <str1> in
            <str2> to return

  Returns:  an integer equal to the starting position of the
            specified occurrence of <str1> inside <str2>

 ---------------------------------- Example ---------------------------------

                 ? stratnext("that","that boy took that toy",1)
                 * prints 1

                 ? stratnext("that","that boy took that toy",2)
                 * prints 15

  Note:     The search is case sensitive. If you only need to find
            the occurrence of a single character, using atnext()
            would result in slightly faster execution.


See Also: strcount() atnext() chrcount() chrswap()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson