% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/locbalq.R
\name{locbalq}
\alias{locbalq}
\title{Find the Location of the Quote to the Right or Left of the One at loc.}
\usage{
locbalq(exp, loc, right = 1)
}
\arguments{
\item{exp}{A string.}

\item{loc}{The location of a quote.}

\item{right}{= 0 to find the one to the left.}
}
\value{
The location of the quote found.
}
\description{
Find the Location of the Quote to the Right or Left of the One at loc.
}
\details{
If exp contains double quotes, exp must be defined by using single quotes
or must be escaped by the use of \.
}
\examples{
exp='regexp("a", "12""a56")'
loc=regexpr('"',exp)
locn=locbalq(exp, loc)
Print(substr(exp,loc,locn))
loc=13
locn=locbalq(exp, loc)
Print(substr(exp,loc,locn))

# location of the non-matching quote
loc=10
locn=locbalq(exp, loc)
Print(substr(exp,loc,locn))

exp="regexp('a', '12''a56')"
locbalq(exp, regexpr("'",exp))
loc=16
locn=locbalq(exp, loc, right=0)
Print(substr(exp,locn,loc))

}
