Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PerroEngine/Perro
/ short_path
Function
short_path
perro_editor/res/scripts/ui/editor_view.rs:1–7 ·
view source on GitHub ↗
(path: &str, max: usize)
Source
from the content-addressed store, hash-verified
1
pub fn short_path(path: &str, max: usize) -> String {
2
if path.len() <= max {
3
path.to_string()
4
} else {
5
format!(
"...{}"
, &path[path.len().saturating_sub(max - 3)..])
6
}
7
}
Callers
6
refresh_manager_view
Function · 0.85
refresh_tabs_view
Function · 0.85
editor_status_text
Function · 0.85
scene_row_label
Function · 0.85
file_row_label
Function · 0.85
file_row_label_for_filter
Function · 0.85
Calls
1
len
Method · 0.45
Tested by
no test coverage detected