summaryrefslogtreecommitdiff
path: root/crates/utils/string_proc/src/simple_processer.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-01-12 04:28:28 +0800
committer魏曹先生 <1992414357@qq.com>2026-01-12 04:51:34 +0800
commitc5fb22694e95f12c24b8d8af76999be7aea3fcec (patch)
tree399d8a24ce491fb635f3d09f2123290fe784059e /crates/utils/string_proc/src/simple_processer.rs
parent444754489aca0454eb54e15a49fb8a6db0b68a07 (diff)
Reorganize crate structure and move documentation files
Diffstat (limited to 'crates/utils/string_proc/src/simple_processer.rs')
-rw-r--r--crates/utils/string_proc/src/simple_processer.rs15
1 files changed, 0 insertions, 15 deletions
diff --git a/crates/utils/string_proc/src/simple_processer.rs b/crates/utils/string_proc/src/simple_processer.rs
deleted file mode 100644
index 2de5dfc..0000000
--- a/crates/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()
-}