input_replace

Crates.ioinput_replace
lib.rsinput_replace
version0.1.1
sourcesrc
created_at2022-10-19 04:13:02.207954
updated_at2022-10-19 04:43:30.469714
descriptionReplace the input character with the specified character
homepage
repository
max_upload_size
id691439
size4,925
Karl (blueteary)

documentation

README

Replace the input character with the specified character

将输入字符替换成指定字符


Example

use input_replace::inp_rep_with;

let input = inp_rep_with('*'); 
println!("{}", input);

If you enter "12345", the terminal displays

*****   //input
12345   //output

Panic!

It triggers a panic when a non-ascll value is obtained.

System

It works in Windows and Linux. It may be problematic to use on Mac systems, as I was unable to test it on a Mac.

Commit count: 0

cargo fmt