/**
* 특정 문자가 스트링에 몇 개 존재하는지 얻는 메서드.
* @param str
* @param mark
* @return
*/
public static int calcCountMark(String str, String mark){
int count = 0;
int begin_col = 0;
try{
if( str == null || str.length() ==0 ){
return 0;
}
while( true ){
if( begin_col > str.length() ){
break;
}
int discover_col = str.indexOf( mark, begin_col );
if( discover_col >= 0){
//찾으면 더 찾기 지속
begin_col = discover_col + 1;
count++;
}
else{
break;
}
}
} catch (Exception ex){
Err.print(ex);
}
return count;
}