Other Functions

This is a list of other functions you may want to use, and what the do in basic terms.

See the API Refrence page for more information.

Splitter

New in version 2.1.0.

The splitter function takes a string or number as a divider, and a series of strings to return, divided. If the first parameter is a number, it looks it up in the divider list. Otherwise, it uses the string provided as a divider. If only one additional string is provided, nothing is returned.

For example:

import area4
print(area4.splitter(1, "Welcome to", "My **app**"))

# outputs:
# Welcome to
# ------------
# My **app**

Get Divider Character

  • area4.utils.get_divider_character()

New in version 2.1.7.

Gets you the material, or character the divider is made of. You need to pass an integer of the divider you want to get the character it is made of.

For example:

from area4.util import get_divider_character

print(get_divider_character(7))

# This example prints a single equal sign to the console,
# because that divider is '============'

Reddit Horizontal

  • area4.utils.reddit_horizontal()

New in version 2.3.1.

This function returns the Reddit Markdown divider (for Reddit bots). This function takes no parameters.

Markdown Horizontal

  • area4.utils.markdown_horizontal()

New in version 2.9.0.

This function returns the Markdown divider (rendered as an HTML ‘hr’ tag by sites like GitHub). This function takes no parameters.

Note

If you want the HTML tag equivalent of the rendered output, see HTML Horizontal.

HTML Horizontal

  • area4.utils.html_horizontal()

New in version 3.1.0.

This function returns the HTML tag(s) for the divider element (rendered as a literal line by default, unless changed via CSS). This function takes 1 optional parameter, closing_tag, more information is detailed in the API Reference section.