package com.github.qrokodial.sparkle.utilities.characters;

public class StringUtils {
    /**
     * Checks to see if a string starts with another string in a case-insensitive manner.
     *
     * @param haystack the main string
     * @param needle the string to test against the main string
     * @return true if it matches, false otherwise
     */
    public static boolean startsWithIgnoreCase(String haystack, String needle) {
        if (needle.length() > haystack.length()) {
            return false;
        }

        for (int i = 0; i < needle.length(); i++) {
            if (!haystack.substring(i, i + 1).equalsIgnoreCase(needle.substring(i, i + 1))) {
                return false;
            }
        }

        return true;
    }
}

@@ -709,32 +709,766 @@
    %7D%0A        %7D%0A%0A
+        return true;%0A    %7D%0A%0A    /**%0A     * Checks to see if a string ends with another string in a case-insensitive manner.%0A     *%0A     * @param haystack the main string%0A     * @param needle the string to test against the main string%0A     * @return true if it matches, false otherwise%0A     */%0A    public static boolean endsWithIgnoreCase(String haystack, String needle) %7B%0A        if (needle.length() %3E haystack.length()) %7B%0A            return false;%0A        %7D%0A%0A        for (int i = 0; i %3C needle.length(); i++) %7B%0A            int start = haystack.length() - needle.length() + i;%0A            if (!haystack.substring(start, start + 1).equalsIgnoreCase(needle.substring(i, i + 1))) %7B%0A                return false;%0A            %7D%0A        %7D%0A%0A
         return t

Implement StringUtils#endsWithIgnoreCase