% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/zz_help_files.R
\name{sf_nchar}
\alias{sf_nchar}
\title{sf_nchar}
\usage{
sf_nchar(x, type = "chars", nthreads = getOption("stringfish.nthreads", 1L))
}
\arguments{
\item{x}{A character vector}

\item{type}{The type of counting to perform ("chars" or "bytes", default: "chars")}

\item{nthreads}{Number of threads to use}
}
\value{
An integer vector of the number of characters
}
\description{
Counts the number of characters in a character vector
}
\details{
Returns the number of characters per string. The type of counting only matters for UTF-8 strings, where a character can be represented by multiple bytes.
}
\examples{
x <- "fa\xE7ile"
Encoding(x) <- "latin1"
x <- sf_iconv(x, "latin1", "UTF-8")
}
\seealso{
nchar
}
