304564d733f6001c1e28d57ca368f595

来自「Svm based face detector code」· 代码 · 共 26 行

TXT
26
字号
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 reverse = position;
		reverse.replaceAll("W", "C");
		reverse.replaceAll("B", "W");
		reverse.replaceAll("C", "B");
		return reverse;
	}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?