public final String validate(String uri, int start, int end, String name)throws URISyntaxException {for (int i = start; i < end; ) {char ch = uri.charAt(i);if ((ch >= 'a' && ch <= 'z')|| (ch >= 'A' && ch <= 'Z')|| (ch >= '0' && ch <= '9')|| isRetained(ch)) {i++;} else if (ch == '%') {if (i + 2 >= end) {throw new URISyntaxException(uri, "Incomplete % sequence in " + name, i);}int d1 = hexToInt(uri.charAt(i + 1));int d2 = hexToInt(uri.charAt(i + 2));if (d1 == -1 || d2 == -1) {throw new URISyntaxException(uri, "Invalid % sequence: "+ uri.substring(i, i + 3) + " in " + name, i);}i += 3;} else {throw new URISyntaxException(uri, "Illegal character in " + name, i);}}return uri.substring(start, end);}
public string validate(string uri, int start, int end, string name){{for (int i = start; i < end; ){char ch = uri[i];if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || isRetained(ch)){i++;}else{if (ch == '%'){if (i + 2 >= end){throw new java.net.URISyntaxException(uri, "Incomplete % sequence in " + name, i);}int d1 = hexToInt(uri[i + 1]);int d2 = hexToInt(uri[i + 2]);if (d1 == -1 || d2 == -1){throw new java.net.URISyntaxException(uri, "Invalid % sequence: " + Sharpen.StringHelper.Substring(uri, i, i + 3) + " in " + name, i);}i += 3;}else{throw new java.net.URISyntaxException(uri, "Illegal character in " + name, i);}}}}return Sharpen.StringHelper.Substring(uri, start, end);}