1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Do not modify this file since it was automatically generated from:
%
% ASCII.R
%
% by the Rdoc compiler part of the R.oo package.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\name{charToInt}
\alias{charToInt.default}
\alias{charToInt}
\title{Converts a vector of ASCII characters into a vector of integers}
\description{
Converts a \code{\link[base]{vector}} of ASCII \code{\link[base]{character}}s to a equal length vector of ASCII
\code{\link[base]{integer}}s.
}
\usage{
\method{charToInt}{default}(ch, ...)
}
\arguments{
\item{ch}{A \code{\link[base]{character}} \code{\link[base]{vector}}.}
\item{...}{Not used.}
}
\value{
Returns an ASCII \code{\link[base]{integer}} \code{\link[base]{vector}}.
}
\author{Henrik Bengtsson}
\examples{
i <- charToInt(unlist(strsplit("Hello world!", split=NULL)))
# Gives: 72 101 108 108 111 32 119 111 114 108 100 33
ch <- intToChar(c(72,101,108,108,111,32,119,111,114,108,100,33))
# Gives: "H" "e" "l" "l" "o" " " "w" "o" "r" "l" "d" "!"
}
\seealso{
\code{\link{intToChar}}()
\code{\link[base]{utf8Conversion}}.
\code{\link[base]{rawConversion}}
}
\keyword{character}
\keyword{internal}
|