The problem that you are solving is the "exact string matching" problem. The naive solution runs in O(n^2) time, but you can do much better than that. Some linear-time algorithms to solve this problem are Knuth-Morris-Pratt (KMP), Boyer-Moore, and Apostolico-Giancarlo. Another way to solve it is by constructing a finite state automaton that enters an accepting state when it sees the pattern string. The best possible solution is O(n), and all those have that worst-case running time. You do have to scan the string from one end to the other; however, it is possible to skip a fraction of the characters (which Boyer-Moore and Apostolico-Giancarlo will do), since some mismatches can imply other mismatches.
If you need to code this yourself, I recommend you go with the Knuth-Morris-Pratt algorithm, since it is a little bit more intuitive and easier to implement than the other solutions I've mentioned. Most programming languges, though, have an "indexOf" or "find" function that will solve this for you.