Skip to main content

PossiblyQuoteName

PossiblyQuoteName (nameStr)

The PossiblyQuoteName string function returns the input name string if it conforms to the rules of standard wave or Data Folder names. If it does not, then the name is returned in single quotes. This is used when generating a command string that you will pass to the Execute command. You might get the input name string from a function such as NameOfWave() or CsrXWave().

Examples

Print PossiblyQuoteName("wave0")    // prints wave0
Print PossiblyQuoteName("wave 0") // prints 'wave 0'

Details

See Programming with Liberal Names.