MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / is_valid_profile_id

Function is_valid_profile_id

crates/openshell-providers/src/profiles.rs:1070–1080  ·  view source on GitHub ↗
(id: &str)

Source from the content-addressed store, hash-verified

1068}
1069
1070fn is_valid_profile_id(id: &str) -> bool {
1071 !id.is_empty()
1072 && !id.starts_with('-')
1073 && !id.ends_with('-')
1074 && id.split('-').all(|part| {
1075 !part.is_empty()
1076 && part
1077 .bytes()
1078 .all(|b| b.is_ascii_lowercase() || b.is_ascii_digit())
1079 })
1080}
1081
1082#[must_use]
1083pub fn validate_profile_set(

Callers 1

normalize_profile_idFunction · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected