Java Terminal Output Format italicText(String str)

Here you can find the source of italicText(String str)

Description

Creates a string with italic style.

License

Open Source License

Parameter

Parameter Description
str String to be styled italic.

Return

String with internal markup-sequences.

Declaration

public static String italicText(String str) 

Method Source Code

//package com.java2s;
/*//from  w  w  w. ja  v a2  s. c  o  m
 * @(#)ColorHelper.java
 *
 * Copyright 2003 by EkoLiving Pty Ltd.  All Rights Reserved.
 *
 * This software is the proprietary information of EkoLiving Pty Ltd.
 * Use is subject to license terms.
 */

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 italic.
     */
    public static final String ITALIC = "i";
    /**
     * Defines the markup representation of the deactivator 
      * for style italic.
      */
    public static final String ITALIC_OFF = "j";

    /**
     * Creates a string with italic style.
     *
     * @param str String to be styled italic.
     *     
     * @return String with internal markup-sequences. 
     */
    public static String italicText(String str) {
        return INTERNAL_MARKER + ITALIC + str + INTERNAL_MARKER + ITALIC_OFF;
    }
}

Related

  1. italicText(String str)