is_abs
pub fn is_abs(p &string) boolPurpose
Whether it is abs.
Parameters
p&string- p (read-only borrow; caller keeps the original; type &string)
Returns
bool — true or false
#pathPOSIX slash paths: join/clean/split/base/dir/ext/matches.
is_abspub fn is_abs(p &string) boolWhether it is abs.
p &stringbool — true or false
basepub fn base(p &string) stringReturn the last element of path.
p &stringstring — result string
dirpub fn dir(p &string) stringReturn all but the last element of path.
p &stringstring — result string
extpub fn ext(p &string) stringReturn the file name extension used by path.
p &stringstring — result string
split_listpub fn split_list(s &string) []stringSplit list.
s &string[]string — slice result
joinpub fn join(parts []string) stringJoin pieces with a separator.
parts []stringstring — result string
splitpub fn split(p &string) []stringsplit returns [dir, file] like path.Split (dir keeps trailing /).
p &string[]string — slice result
cleanpub fn clean(p &string) stringclean folds.,.., and repeated separators ( path.Clean). Uses an int offset stack + string buffer (not []string[len-1] rebuild) that branch was not taken (frame/index poison).
p &stringstring — result string
matchespub fn matches(pattern &string, name &string) boolmatch reports whether name matches pattern ( path.Match (Xu: matches)). Throws on failure; handle the error or propagate it to the caller.
pattern &stringname &stringbool — true or false
has_prefixpub fn has_prefix(p &string, prefix string) boolReport whether the value has the given prefix.
p &stringprefix stringbool — true or false
has_suffixpub fn has_suffix(p &string, suffix string) boolReport whether the value has the given suffix.
p &stringsuffix stringbool — true or false