예제 #1
0
파일: Parser.java 프로젝트: 4fath/sipdroid
 /** Gets the index of the first occurence of any string of array <i>ss</i> ignoring case. */
 public int indexOfIgnoreCase(String[] ss) {
   Parser par = new Parser(str, index);
   while (par.hasMore()) {
     if (par.startsWithIgnoreCase(ss)) return par.getPos();
     else par.skipChar();
   }
   return -1;
 }
예제 #2
0
파일: SipURL.java 프로젝트: jptien/ims-v1
 /** Removes specified parameter (if present) */
 public void removeParameter(String name) {
   int index = url.indexOf(';');
   if (index < 0) return;
   Parser par = new Parser(url, index);
   while (par.hasMore()) {
     int begin_param = par.getPos();
     par.skipChar();
     if (par.getWord(SipParser.param_separators).equals(name)) {
       String top = url.substring(0, begin_param);
       par.goToSkippingQuoted(';');
       String bottom = "";
       if (par.hasMore()) bottom = url.substring(par.getPos());
       url = top.concat(bottom);
       return;
     }
     par.goTo(';');
   }
 }
예제 #3
0
파일: Parser.java 프로젝트: 4fath/sipdroid
 /** Gets the begin of next line */
 public int indexOfNextLine() {
   Parser par = new Parser(str, index);
   par.goToNextLine();
   int i = par.getPos();
   return (i < str.length()) ? i : -1;
 }