MCPcopy Create free account
hub / github.com/ddd/gpb / create_fully_masked_pattern

Function create_fully_masked_pattern

src/utils/mask.rs:156–160  ·  view source on GitHub ↗

Create a fully masked pattern by replacing all digits with dots

(pattern: &str)

Source from the content-addressed store, hash-verified

154
155/// Create a fully masked pattern by replacing all digits with dots
156fn create_fully_masked_pattern(pattern: &str) -> String {
157 pattern.chars()
158 .map(|c| if c.is_digit(10) { '•' } else { c })
159 .collect()
160}
161
162// Extract visible country code from an international format masked phone number
163fn extract_visible_country_code(masked_phone: &str) -> String {

Calls

no outgoing calls

Tested by 1