Skip to contents

From the Zarr specification, the following constraints apply to node names:

  • must not be the empty string (""), except for the root node

  • must not be a string composed only of period characters, e.g. "." or ".."

  • must not start with the reserved prefix "__".

Only punctuation characters in the set -, _, . are allowed. As an extension to the Zarr specification, characters and numbers can be any UTF-8 code point. When portability is an issue, restrict characters and numbers to the set A-Za-z0-9.

Usage

is_valid_node_name(name)

Arguments

name

Character string with a node name to check.

Value

TRUE if the node name is valid, FALSE otherwise.

Examples

is_valid_node_name("simple_name")
#> [1] TRUE
is_valid_node_name("no spaces allowed!")
#> [1] FALSE