% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/topic.R
\name{topic_split}
\alias{topic_split}
\title{Split a qualified topic into package and topic}
\usage{
topic_split(topic)
}
\arguments{
\item{topic}{A single string.}
}
\value{
A list with elements \code{package} (a string, or \code{NULL} if the
topic is unqualified) and \code{topic}.
}
\description{
Splits \code{"pkg::topic"} (or \code{"pkg:::topic"}) into its package and topic
components. The prefix is only treated as a qualifier when it is a
syntactically valid package name, so aliases that merely contain \code{::}
(e.g. S7 method aliases like \code{"speak,foo::Dog-method"}) are left intact.
}
\examples{
topic_split("stats::rnorm")
topic_split("rnorm")
topic_split("speak,foo::Dog-method")
}
