Skip to main content

derive_new_pack_name

Function derive_new_pack_name 

Source
fn derive_new_pack_name(existing_keys: &BTreeMap<String, Pack>) -> String
Expand description

Derives a unique pack name for new (unsaved) packs. Appends a numeric suffix (_2, _3, etc.) to the stem if the base name is already taken. Returns a name like “new_pack.pack”, “new_pack_2.pack”, etc.