Java tutorial
//package com.java2s; public class Main { public static int findChar(String s, char target, int offset) { int l = s.length(); int i = offset; int found = -1; while (i < l) { if (s.charAt(i) == target) { found = i; i = l; } i++; } return found; } }