Java HTML htmlWrap(String text)

Here you can find the source of htmlWrap(String text)

Description

html Wrap

License

Open Source License

Declaration

public static String htmlWrap(String text) 

Method Source Code

//package com.java2s;

public class Main {
    private static final char WRAPPING_BREAK = '\n';
    private static final String HTML_BREAK = "</br>";
    private static final String NBSP = "&nbsp;";

    public static String htmlWrap(String text) {
        String s = text.replaceAll(String.valueOf(WRAPPING_BREAK), HTML_BREAK);
        return s.replaceAll(" ", NBSP);
    }//from   w  w  w.  j a  v a2  s. c o  m
}

Related

  1. htmlSize(String str)
  2. htmlString(String str)
  3. htmlText(String text)
  4. HTMLtoRGB(String htmlColor)
  5. HTMLToTriplet(String color)
  6. htmlWrap(StringBuilder s)