summaryrefslogtreecommitdiff
path: root/utils/string_proc/src/simple_processer.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-02-25 15:24:18 +0800
committer魏曹先生 <1992414357@qq.com>2026-02-25 15:24:18 +0800
commitfcbd18c4b7d90388a9a2b9e28555d2526727958c (patch)
tree0de680895d6a162a99356d6e4d733942a339275e /utils/string_proc/src/simple_processer.rs
parent8b96e8171c4e9d6516fd63d37cbe613bd5927a04 (diff)
Replace string_proc with just_fmt as external dependency
Diffstat (limited to 'utils/string_proc/src/simple_processer.rs')
-rw-r--r--utils/string_proc/src/simple_processer.rs15
1 files changed, 0 insertions, 15 deletions
diff --git a/utils/string_proc/src/simple_processer.rs b/utils/string_proc/src/simple_processer.rs
deleted file mode 100644
index 2de5dfc..0000000
--- a/utils/string_proc/src/simple_processer.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-/// Sanitizes a file path by replacing special characters with underscores.
-///
-/// This function takes a file path as input and returns a sanitized version
-/// where characters that are not allowed in file paths (such as path separators
-/// and other reserved characters) are replaced with underscores.
-pub fn sanitize_file_path<P: AsRef<str>>(path: P) -> String {
- let path_str = path.as_ref();
- path_str
- .chars()
- .map(|c| match c {
- '/' | '\\' | ':' | '*' | '?' | '"' | '<' | '>' | '|' => '_',
- _ => c,
- })
- .collect()
-}