% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/messages.R
\name{message_helpers}
\alias{message_helpers}
\alias{get_message_stack}
\alias{set_no_print}
\alias{print_stack_as_messages}
\alias{convert_square_brackets}
\title{Message Helper Functions}
\usage{
get_message_stack(as_data_frame = FALSE)

set_no_print(value = FALSE)

print_stack_as_messages(type = NULL)

convert_square_brackets(text, ...)
}
\arguments{
\item{as_data_frame}{FALSE by default. If TRUE returns message stack information as
data frame.}

\item{value}{Can be TRUE or FALSE.}

\item{type}{The message type to filter.}

\item{text}{The text in which to replace the curly brackets.}

\item{...}{The actual replacement vectors.}
}
\value{
\code{\link[=get_message_stack]{get_message_stack()}}: Returns a list of messages or a data frame.

\code{\link[=set_no_print]{set_no_print()}}: Returns the global no_print option.

\code{\link[=print_stack_as_messages]{print_stack_as_messages()}}: Returns NULL.

\code{\link[=convert_square_brackets]{convert_square_brackets()}}: Returns formatted text.
}
\description{
\code{\link[=get_message_stack]{get_message_stack()}}: Retrieves the current message stack as list or data frame.

\code{\link[=set_no_print]{set_no_print()}}: FALSE by default. If set to TRUE the messages will be formatted
and returned but not printed to the console. Can e.g. be used in unit test
situations.

\code{\link[=print_stack_as_messages]{print_stack_as_messages()}}: Prints the message stack as actual messages (only
not suppressed messages). Can be used to trigger expect_message, expect_warning
or expect_error in unit tests.

\code{\link[=convert_square_brackets]{convert_square_brackets()}}: Convert different curly bracket patterns into ansi
formatting or passes the context of vectors into the text.
}
\details{
The message types in which you can enter custom texts, are capable of using
different styling operators. These are:
\itemize{
\item Insert list of elements: [vector_name]
\item Adding conditional words, if list of elements has more than one element: [?word]
\item Adding conditional singular/plural, depending on list of element length: [?singular/plural]
\item Bold, italic and underline: [b]some text[/b], [i]some text[/i], [u]some text[/u]
\item Coloring parts of the message: [#FF00FF some text]
}
}
\seealso{
Main printing functions: \code{\link[=print_message]{print_message()}}, \code{\link[=print_headline]{print_headline()}}, \code{\link[=print_start_message]{print_start_message()}},
\code{\link[=print_closing]{print_closing()}}, \code{\link[=print_step]{print_step()}}, \code{\link[=set_up_custom_message]{set_up_custom_message()}}
}
