I want to remove a string from another string, not all the letters.
example: "hello world my name is john"
removing: "ewo"
result: "hllo rld my name is john"
my program deletes all the letters that are from removing
String text = "hello world my name is john";
int num = 1;
for (int i = 0; i < num; i++) {
String del = ewo;
String[] delArray = del.split("");
for (int j = 0; j < delArray.length; j++) {
text = text.replace(delArray[j], "");
}
System.out.println(text);
}
My program return: "hll rld my nam is jhn", but that's not what I need
String.valueOf(detail.toString.charAt(position));to get the value at each position and delete them based on your requirement.