题目描述:在源字符串中查找目标字符串,并返回目标字符串首次在源字符串出现的位置,类似于库函数indexOf()功能
eg: source = "abhdgf" target= "hdg" 返回2
source = "ghdks" target= "hds" 返回-1
public static int getFirstIndex(String source , String target){
}
public static int getFirstIndex(String source , String target){
}