Function cargo_export::split_file_name
source · pub fn split_file_name(input: &str) -> (&str, Option<&str>, Option<&str>)
Expand description
Returns tuple of 3 strings: file name (without hash and etensions), hash and extension) 2 are optional
Filenames generated by cargo have the following format: <name>-<hash>.<extension>
. The extension is optional and
is only present for Windows executables. The hash is optional and is only present for tests and benchmarks.
This method strips the hash and extension from the file name and returns them as separate strings.
If the hash or extension is not present, they are returned as None
. Currently, only the .exe
extension
is supported.