Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Tags
- descendingOrder
- type
- isSquare
- react
- custom hook
- codewars
- TypeScript
- TABLESPACE
- useEffect
- IBM
- java api
- Debug
- JDBC
- react hook
- codewar
- DB2
- manifest.json
Archives
- Today
- Total
taesik
Masking with # except last 4 string 본문
"64607935616" --> "#######5616"
"1" --> "1"
"" --> ""
fn maskify(cc: &str) -> String {
let mask_length = cc.len().saturating_sub(4);
"#".repeat(mask_length) + &cc[mask_length..]
}'functions and trick > RUST' 카테고리의 다른 글
| return the number of vowels (0) | 2022.06.09 |
|---|---|
| Break camelCase (0) | 2022.06.06 |
| Largest 5 digit number in a series (0) | 2022.06.06 |