protected String translateToHTML(final String text){
  final StringBuilder sbuf=new StringBuilder();
  final StringCharacterIterator ci=new StringCharacterIterator(text);
  char ch=ci.current();
  while (ch != CharacterIterator.DONE) {
    if (ch == '#') {
      ch=ci.next();
      if (ch == '#') {
        appendHTML(sbuf,ch);
        ch=ci.next();
      }
 else {
        final String link=extractLink(ci);
        if (link != null) {
          buildLink(sbuf,link);
        }
        ch=ci.current();
      }
    }
 else {
      appendHTML(sbuf,ch);
      ch=ci.next();
    }
  }
  return sbuf.toString();
}

protected String translateToHTML ( final String text ) { final StringBuilder sbuf = new StringBuilder ( ) ; final StringCharacterIterator ci = new StringCharacterIterator ( text ) ; char ch = ci . current ( ) ; while ( ch != CharacterIterator . DONE ) { if ( ch == '#' ) { ch = ci . next ( ) ; if ( ch == '#' ) { appendHTML ( sbuf , ch ) ; ch = ci . next ( ) ; } else { final String link = extractLink ( ci ) ; if ( link != null ) { buildLink ( sbuf , link ) ; } ch = ci . current ( ) ; } } else { appendHTML ( sbuf , ch ) ; ch = ci . next ( ) ; } } return sbuf . toString ( ) ; }
translate a standard stendhal encoded to html encoded .
