ts/man/ts_character.Rd
2025-02-24 14:35:02 +13:00

23 lines
683 B
R

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/types.R
\name{ts_character}
\alias{ts_character}
\title{Character or string type}
\usage{
ts_character(n = -1L)
}
\arguments{
\item{n}{The length of the string vector. If \code{n = 1} then a single string is expected. If \code{n = 0} then any length is expected. If \code{n > 1} then a string vector of length \code{n} is expected.}
}
\value{
A ts object that accepts strings or string vectors of length \code{n}.
}
\description{
Strings are represented in Zod schema as either a string (\code{z.string()}),
or a string array (\code{z.array(z.string())}).
}
\examples{
x <- ts_character(1)
x$check("a")
}