% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_hts.R
\name{clean_compound_id}
\alias{clean_compound_id}
\title{Standardise compound identifiers}
\usage{
clean_compound_id(x, to_upper = TRUE)
}
\arguments{
\item{x}{A character vector of compound identifiers.}

\item{to_upper}{Logical; if \code{TRUE} (default) the result is upper-cased.}
}
\value{
A character vector of cleaned identifiers.
}
\description{
Cleans free-text compound identifiers into a consistent form: trims
surrounding whitespace, collapses internal whitespace, and replaces illegal
or separator characters with underscores so that IDs can be matched and used
safely in file names.
}
\examples{
clean_compound_id(c("  cpd 001 ", "Drug/A", "cpd-002!"))

}
