% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/apply_fmt_fun.R
\name{.check_fmt_string}
\alias{.check_fmt_string}
\title{Check 'xx' Format Structure}
\usage{
.check_fmt_string(x, variable, stat_name)
}
\arguments{
\item{x}{(\code{string})\cr
string to check}

\item{variable}{(\code{character})\cr the variable whose statistic is to be formatted}

\item{stat_name}{(\code{character})\cr the name of the statistic that is to be formatted}
}
\value{
a logical
}
\description{
A function that checks a \strong{single} string for consistency.
String must begin with 'x' and only consist of x's, a single period or none,
and may end with a percent symbol.

If string is consistent, \code{TRUE} is returned. Otherwise an error.
}
\examples{
cards:::.check_fmt_string("xx.x") # TRUE
cards:::.check_fmt_string("xx.x\%") # TRUE
}
\keyword{internal}
