private int checkUserLink(SpannableStringBuilder out,String in,int start){
  int pos=start + 3;
  StringBuilder temp=new StringBuilder();
  String targetString=in.substring(pos,Math.min(in.length(),pos + 20));
  for (int i=0; i < targetString.length(); i++) {
    char c=targetString.charAt(i);
    if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')|| c == '_') {
      temp.append(c);
    }
 else {
      break;
    }
  }
  String username=temp.toString();
  if (username.length() < 3 || username.equalsIgnoreCase("null")) {
    return -1;
  }
  out.append(username);
  return pos + username.length() - 1;
}

private int checkUserLink ( SpannableStringBuilder out , String in , int start ) { int pos = start + 3 ; StringBuilder temp = new StringBuilder ( ) ; String targetString = in . substring ( pos , Math . min ( in . length ( ) , pos + 20 ) ) ; for ( int i = 0 ; i < targetString . length ( ) ; i ++ ) { char c = targetString . charAt ( i ) ; if ( ( c >= 'a' && c <= 'z' ) || ( c >= 'A' && c <= 'Z' ) || ( c >= '0' && c <= '9' ) || c == '_' ) { temp . append ( c ) ; } else { break ; } } String username = temp . toString ( ) ; if ( username . length ( ) < 3 || username . equalsIgnoreCase ( "null" ) ) { return - 1 ; } out . append ( username ) ; return pos + username . length ( ) - 1 ; }
change this should review account . java
