idSlug is a convenience function with swapped argument order.
Length of slug
If not NULL, prepended to slug (separated with a dash) as id; in that case, it's also braces and a hash is added.
Characters to sample from
A character value.
randomSlug();
#> [1] "BNyL8V9W1O"
idSlug("identifier");
#> [1] " {#identifier-AqhUIuvTwx}"