locDBCS {lazy.tools} | R Documentation |
Retruns the Location of Double Byte Characters in a String
locDBCS(x)
x |
String vector |
A vector or list of vectors consisting of the length of each character of x.
# A string consisting of single and double byte characters nza=c(97,98,130,131,100,101,130,134,130,135,104) za=rawToChar(as.raw(nza)) # location of the double byte characters locDBCS(za) # The single byte characters. strsplit(za,"")[[1]][locDBCS(za)==1]