# Let's get all the `ar` locales that exist
# in the vector produced by `fdt_locales_vec()`
grep("^ar", fdt_locales_vec(), value = TRUE)
# Let's get all the locales that pertain to the
# `CH` territory in the vector produced by
# `fdt_locales_vec()`
grep("CH", fdt_locales_vec(), value = TRUE)
Run the code above in your browser using DataLab