randomSlug: Generate a random slug

View source: R/randomSlug.R

randomSlugR Documentation

Generate a random slug

Description

idSlug is a convenience function with swapped argument order.

Usage

randomSlug(x = 10, id = NULL, chars = c(letters, LETTERS, 0:9))

idSlug(id = NULL, x = 10, chars = c(letters, LETTERS, 0:9))

Arguments

x

Length of slug

id

If not NULL, prepended to slug (separated with a dash) as id; in that case, it's also braces and a hash is added.

chars

Characters to sample from

Value

A character value.

Examples

randomSlug();
idSlug("identifier");

preregr documentation built on May 31, 2023, 7:10 p.m.