% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils-validation.R
\name{abbrev_label}
\alias{abbrev_label}
\alias{label_abbrev}
\title{Abbreviate Labels}
\usage{
abbrev_label(label, abbrev = NULL, n_labels = NULL)

label_abbrev(label, abbrev = NULL, n_labels = NULL)
}
\arguments{
\item{label}{Character vector of labels to abbreviate.}

\item{abbrev}{Abbreviation control:
\itemize{
\item NULL: No abbreviation (return labels unchanged)
\item Integer: Maximum character length (truncate + ellipsis)
\item "auto": Adaptive abbreviation based on label count
}}

\item{n_labels}{Number of labels (used for "auto" mode). If NULL, uses
length(label).}
}
\value{
Character vector of (possibly abbreviated) labels.
}
\description{
Abbreviates labels to a maximum length, adding ellipsis if truncated.
}
\examples{
labels <- c("VeryLongStateName", "Short", "AnotherLongName")

# No abbreviation
abbrev_label(labels, NULL)

# Fixed max length
abbrev_label(labels, 5)  # "Very…", "Short", "Anot…"

# Auto-adaptive
abbrev_label(labels, "auto")
}
