Write pseudo code for pattern searching or finding a substring from another bigger string?

Pseudo Code: -

for i := 0 to (lenStr - patLen), do
     for j := 0 to patLen, do
        if text[i+j] ≠ pattern[j], then
           break the loop
     done

     if j == patLen, then
        display the position i, as pattern found