Expand description

Slash Formatter

This crate provides functions to deal with slashes and backslashes in strings.

Examples

To see examples, check out the documentation for each function.

Macros

Concatenate multiple strings with backslashes.

Concatenate multiple strings with backslashes.

Concatenates literals into a static string slice separated by a backslash. Prefixes and suffixes can also be added.

Concatenates literals into a static string slice separated by FILE_SEPARATOR. Prefixes and suffixes can also be added.

Concatenates literals into a static string slice separated by FILE_SEPARATOR_ON_WORKSTATION. Prefixes and suffixes can also be added.

Concatenates literals into a static string slice separated by file separators which depends on the target OS if in debug mode, or depends on the workstation if in release mode. Prefixes and suffixes can also be added.

Concatenates literals into a static string slice separated by a slash. Prefixes and suffixes can also be added.

Concatenate multiple strings with FILE_SEPARATOR. It can also be used to get the literal FILE_SEPARATOR.

Concatenate multiple strings with FILE_SEPARATOR_ON_WORKSTATION. It can also be used to get the literal FILE_SEPARATOR_ON_WORKSTATION.

Concatenate multiple strings with FILE_SEPARATOR_ON_WORKSTATION. It can also be used to get the literal FILE_SEPARATOR_ON_WORKSTATION.

Concatenate multiple strings with FILE_SEPARATOR. It can also be used to get the literal FILE_SEPARATOR.

Concatenate multiple strings with slashes. It can also be used to get the literal '/'.

Concatenate multiple strings with slashes. It can also be used to get the literal '/'.

Functions

Add an ending backslash into a string.

Add an ending backslash into a string.

Add an ending FILE_SEPARATOR into a string.

Add an ending FILE_SEPARATOR_ON_WORKSTATION into a string.

Add an ending FILE_SEPARATOR_ON_WORKSTATION into a string.

Add an ending FILE_SEPARATOR into a string.

Add an ending slash into a string.

Add an ending slash into a string.

Add a starting backslash into a string.

Add a starting backslash into a string.

Add a starting FILE_SEPARATOR into a string.

Add a starting FILE_SEPARATOR_ON_WORKSTATION into a string.

Add a starting FILE_SEPARATOR_ON_WORKSTATION into a string.

Add a starting FILE_SEPARATOR into a string.

Add a starting slash into a string.

Add a starting slash into a string.

Concatenate two strings with a backslash.

Concatenate two strings with a backslash.

Concatenate two strings with FILE_SEPARATOR.

Concatenate two strings with FILE_SEPARATOR_ON_WORKSTATION.

Concatenate two strings with FILE_SEPARATOR_ON_WORKSTATION.

Concatenate two strings with FILE_SEPARATOR.

Concatenate two strings with a slash.

Concatenate two strings with a slash.

Delete an ending backslash in a string except for ‘\\’.

Delete an ending backslash in a string except for ‘\\’.

Delete an ending FILE_SEPARATOR in a string except for just FILE_SEPARATOR.

Delete an ending FILE_SEPARATOR_ON_WORKSTATION in a string except for just FILE_SEPARATOR_ON_WORKSTATION.

Delete an ending FILE_SEPARATOR_ON_WORKSTATION in a string except for just FILE_SEPARATOR_ON_WORKSTATION.

Delete an ending FILE_SEPARATOR in a string except for just FILE_SEPARATOR.

Delete an ending slash in a string except for ‘/’.

Delete an ending slash in a string except for ‘/’.

Delete a starting backslash in a string except for ‘\\’.

Delete a starting backslash in a string except for ‘\\’.

Delete a starting FILE_SEPARATOR in a string except for just FILE_SEPARATOR.

Delete a starting FILE_SEPARATOR_ON_WORKSTATION in a string except for just FILE_SEPARATOR_ON_WORKSTATION.

Delete a starting FILE_SEPARATOR_ON_WORKSTATION in a string except for just FILE_SEPARATOR_ON_WORKSTATION.

Delete a starting FILE_SEPARATOR in a string except for just FILE_SEPARATOR.

Delete a starting slash in a string except for ‘/’.

Delete a starting slash in a string except for ‘/’.