📄 20fa4d3533f6001c1e28d57ca368f595
字号:
package com.sans.ninemen.core;
public class Utility {
public static int countChar(String position,char x) {
int length = position.length();
char[] charArray = new char[23];
charArray = position.toCharArray();
int count =0;
for(int i=0;i<23;i++) {
if(charArray[i]==x) {
count++;
}
}
return count;
}
public static String reverseColors(String position) {
String temp = position;
String reverse = position;
reverse.replaceAll("W", "C");
reverse.replaceAll("B", "W");
reverse.replaceAll("C", "B");
return reverse;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -