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

Function mask_input_value

crates/openshell-tui/src/ui/create_provider.rs:417–424  ·  view source on GitHub ↗

Mask a secret input value for display (truncate with `...` if long).

(value: &str)

Source from the content-addressed store, hash-verified

415
416/// Mask a secret input value for display (truncate with `...` if long).
417fn mask_input_value(value: &str) -> String {
418 let len = value.len();
419 if len <= 20 {
420 "*".repeat(len)
421 } else {
422 format!("{}...", "*".repeat(17))
423 }
424}
425
426// ---------------------------------------------------------------------------
427// Phase 4: Creating (pacman animation + result)

Callers 1

draw_enter_keyFunction · 0.85

Calls 1

lenMethod · 0.80

Tested by

no test coverage detected