'Declaration
Public Shared Function SanitizeFileName( _ ByVal fileName As String, _ Optional ByVal eliminateSpaces As Boolean, _ Optional ByVal lowerCaseOnly As Boolean, _ Optional ByVal replaceChar As Char _ ) As String
public static string SanitizeFileName( string fileName, bool eliminateSpaces, bool lowerCaseOnly, char replaceChar )
Parameters
- fileName
- The file name to sanitize
- eliminateSpaces
- When true, treat whitespace as an illegal value
- lowerCaseOnly
- When true, ensure the final name is lower case.
- replaceChar
- The character to substitute for illegal values, must be legal.
Return Value
The sanitized file name.