Java HTML Create boldHTML(String input)

Here you can find the source of boldHTML(String input)

Description

Return string enclosed in HTML bold tags

License

Open Source License

Declaration

public static String boldHTML(String input) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**/*w w  w  .j av a2s. c  o  m*/
     * Return string enclosed in HTML bold tags
     */
    public static String boldHTML(String input) {
        return "<b>" + input + "</b>";
    }

    /**
     * Return string enclosed in HTML bold tags  if not null, otherwise return alternative text in HTML bold tags
     */
    public static String boldHTML(String input, String alternative) {

        if (input == null) {
            return "<b>" + alternative + "</b>";
        }
        return "<b>" + input + "</b>";
    }
}

Related

  1. bold(String s)
  2. bold(String str)
  3. bold(String text)
  4. bold(String text)
  5. boldenRefOrType(String label)
  6. boldIf(String str, boolean bold)
  7. italics(String inner)