The list of methods to do Array Replace are organized into topic(s).
char[]
replace(char[] array, char[] toBeReplaced, char[] replacementChars) replace
int max = array.length;
int replacedLength = toBeReplaced.length;
int replacementLength = replacementChars.length;
int[] starts = new int[5];
int occurrenceCount = 0;
if (!equals(toBeReplaced, replacementChars)) {
next: for (int i = 0; i < max; i++) {
int j = 0;
...
char[][]
replace(char[][] arrays, char character, char[][] replacements) replace
List<char[]> list = new ArrayList<char[]>();
for (char[] array : arrays) {
String string = String.valueOf(array);
if (string.indexOf(character) >= 0) {
for (char[] replacement : replacements) {
list.add(string.replaceAll(String.valueOf(character), String.valueOf(replacement))
.toCharArray());
} else {
list.add(array);
return list.toArray(new char[list.size()][]);
char[][]
replace(char[][] arrays, char character, char[][] replacements) replace
List<char[]> list = new ArrayList<char[]>();
for (char[] array : arrays) {
String string = String.valueOf(array);
if (string.indexOf(character) >= 0) {
for (char[] replacement : replacements) {
list.add(string.replaceAll(String.valueOf(character), String.valueOf(replacement))
.toCharArray());
} else {
list.add(array);
return list.toArray(new char[list.size()][]);
Object[]
replaceAll(final Object[] objs, final String str) Returns stripped value from the specified array of stuff
if (isEmpty(objs, false)) {
return null;
List<Object> list = new ArrayList<Object>(Arrays.asList(trimArray(objs)));
list.removeAll(Collections.singletonList(str));
return list.toArray(new Object[list.size()]);
String
replaceAll(String src, String[] replace, String[] by) Replaces all Strings in replace by the corresponding String in by, that is the ith String in replace is replaced by the ith String in by, in order.
for (int i = 0; i < replace.length; i++) {
src = src.replace(replace[i], by[i]);
return src;
String
replaceChars(String s, char[] from, char[] to) replace Chars
StringBuilder sb = new StringBuilder();
for (int i = 0; i < s.length(); i++) {
char ch = s.charAt(i);
int index = Arrays.binarySearch(from, ch);
if (index >= 0) {
sb.append(to[index]);
} else {
sb.append(ch);
...