#input #character #replace #rep #panic

yanked input_replace

Replace the input character with the specified character

0.1.1 Oct 19, 2022
0.1.0 Oct 19, 2022

#136 in #panic

30 downloads per month

MIT license

5KB
124 lines

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.

Dependencies

~215KB