Java HTML Encode toHtml(String txt)

Here you can find the source of toHtml(String txt)

Description

to Html

License

Apache License

Declaration

public static String toHtml(String txt) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static String toHtml(String txt) {
        return txt.replaceAll("\n", "<br>");
    }//from   w  w w  . j  a v a  2 s  .  c  o  m
}

Related

  1. toHtml(String str)
  2. toHTML(String string)
  3. toHTML(String text)
  4. toHtml(String text)
  5. toHtml(String trace)
  6. toHtml(String value, String defaultValue)
  7. toHTML(String xhtml)
  8. toHtmlChars(String htmlReady)
  9. toHTMLContentString(String s, boolean replaceSpaces, boolean isXhtml)