(vectorised) Detect the position of space in a string not within a pair of single quotes

positionSpaceOutsideSinglequotes(string)

Arguments

string

A character vector

Value

A integer vector of positions

Examples

# \donttest{
tidyrules:::positionSpaceOutsideSinglequotes(c("hello", "hel' 'o "))
#> [[1]]
#> integer(0)
#> 
#> [[2]]
#> [1] 8
#> 
# }