public static boolean endsWith(char s[], int len, String suffix) {final int suffixLen = suffix.length();if (suffixLen > len)return false;for (int i = suffixLen - 1; i >= 0; i--)if (s[len -(suffixLen - i)] != suffix.charAt(i))return false;return true;}

public static bool EndsWith(char[] s, int len, string suffix){int suffixLen = suffix.Length;if (suffixLen > len){return false;}for (int i = suffixLen - 1; i >= 0; i--){if (s[len - (suffixLen - i)] != suffix[i]){return false;}}return true;}
