@@ -0,0 +1,589 @@
+package ru.nivanov;%0A%0Apublic class SubOrigin %7B%0A%09%0A%09boolean contains(String origin, String sub) %7B%0A%09%09%0A%09%09char%5B%5DchOrig = origin.toCharArray();%0A%09%09char%5B%5DchSub = sub.toCharArray();%0A%09%09%0A%09%09int index = 0;%0A%09%09int count = 0;%0A%09%09boolean result = false;%0A%09%09%09%09%0A%09%09for (int j = 0; j %3C chSub.length; j++) %7B%0A%09%09%09%0A%09%09%09for (int i = index; i %3C chOrig.length; i++) %7B%0A%09%09%09%09if (chSub%5Bj%5D==chOrig%5Bi%5D) %7B%0A%09%09%09%09%09index = i + 1;%0A%09%09%09%09%09count ++;%0A%09%09%09%09%09break;%0A%09%09%09%09%7D %0A%09%09%09%09else %7B%0A%09%09%09%09%09count = 0;%0A%09%09%09%09%7D%0A%09%09%09%09%09%09%09%09%09%09%0A%09%09%09%7D%0A%09%09%09%09%09%0A%09%09%7D%0A%09%09%0A%09%09if (count == chSub.length) %7B%0A%09%09%09result = true;%0A%09%09%7D else %0A%09%09%09result = false;%0A%09%09%0A%09%09return result;%0A%09%09%0A%09%7D%0A%0A%7D

add SubOrigin