Java String Divide div(String text)

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

Description

Creates a div element.

License

Open Source License

Parameter

Parameter Description
text the contents of the element.

Return

the element string.

Declaration

public static String div(String text) 

Method Source Code

//package com.java2s;
/*---------------------------------------------------------------
*  Copyright 2005 by the Radiological Society of North America
*
*  This source software is released under the terms of the
*  RSNA Public License (http://mirc.rsna.org/rsnapubliclicense)
*----------------------------------------------------------------*/

public class Main {
    /**/* w  w w  .  j  av  a 2  s . c om*/
     * Creates a div element.
     * @param text the contents of the element.
     * @return the element string.
     */
    public static String div(String text) {
        return "<div>" + text + "</div>";
    }

    /**
     * Creates a div element with attributes.
     * @param attributes the attributes of the element.
     * @param text the contents of the element.
     * @return the element string.
     */
    public static String div(String attributes, String text) {
        return "<div" + (!attributes.equals("") ? " " + attributes : "") + ">" + text + "</div>";
    }
}

Related

  1. div(String content, String extra)
  2. div(String second, String first)
  3. divide(final String s)
  4. divide(Object o1, Object o2, String type)
  5. divide(String m)
  6. divide(String str, char c)