@@ -0,0 +1,1117 @@
+package ru.sbulygin;%0A%0A/**%0A* Class SubstringSearch.%0A* @author sbulygin.%0A* @since 23.12.2016.%0A* @version 1.0.%0A*/%0A%0Apublic class  SubstringSearch %7B%0A%0A    /**%0A    * Method contains.%0A    * This method checks whether the string contains a substring.%0A    * @param origin in which to search the substring.%0A    * @param sub substring to check.%0A    * @return result true if a string contains a substring, and false otherwise.%0A    */%0A    boolean contains(String origin, String sub) %7B%0A        boolean result = false;%0A        int count = 0;%0A        char%5B%5D originArray = origin.toCharArray();%0A        char%5B%5D subArray = sub.toCharArray();%0A        for (int i = 0; i %3C originArray.length; i++) %7B%0A            if (originArray%5Bi%5D == subArray%5B0%5D && subArray.length %3C= originArray.length) %7B%0A                for (int k = 0; k %3C subArray.length; k++) %7B%0A                    if (originArray%5Bi + k%5D == subArray%5Bk%5D) %7B%0A                        count++;%0A                    %7D%0A                %7D%0A                if (count == subArray.length) %7B%0A                    result = true;%0A                %7D%0A            %7D%0A        %7D%0A        return result;%0A    %7D%0A %7D

add 23.12