DBWReplaceInvalidChars

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Library Reference > File >

DBWReplaceInvalidChars

Description

Given a string, the function replaces the followings not allowed characters

 < > \ / | $ % ^ * " ? :

with underscore so to be suitable for being a filename on Windows filesystems.

Syntax

Function DBWReplaceInvalidChars(InputString)

Parameters

InputString

The string to be adapted

Return values

The function returns the adapted string with no valid chars substituted by underscore char "_"

Example

inputString = "<this is my string> - **??"
convertedString = DBWReplaceInvalidChars(inputString)

convertedString will assume the value of

_this is my string_ - ____