Here you can find the source of boldText(String str)
Parameter | Description |
---|---|
str | String to be styled bold. |
public static String boldText(String str)
//package com.java2s; //License/*from www . j a va2 s. co m*/ public class Main { /** * Defines the internal marker string for style/color markups. */ public static final String INTERNAL_MARKER = "\001"; /** * Defines the markup representation of the activator for style bold * (normally represented by high intensity). */ public static final String BOLD = "f"; /** * Defines the markup representation of the deactivator for style bold. */ public static final String BOLD_OFF = "d"; /** * Creates a string with high intensity (bold). * * @param str * String to be styled bold. * @return String with internal markup-sequences. */ public static String boldText(String str) { return INTERNAL_MARKER + BOLD + str + INTERNAL_MARKER + BOLD_OFF; } }