PDA

View Full Version : Removing slash from a string


Shiamak
05-15-2014, 06:59 PM
I have need to remove couple of slashes from a string (in a macro), then reassign the value to the same macro. Is there an easy way to do it in VBP 8?

Original String
1. STRING1 - "\\Machine1" (STRING1 IS A MACRO)

Expected:
STRING1="MACHINE1" (Removing "\\")

kinook
05-15-2014, 08:50 PM
See the attached sample.

Shiamak
05-16-2014, 12:24 PM
See the attached sample.

It totally worked... Thanks a bunch.
A quick qs though, is there a list of similar functions available in VBP help? or you just called a VB function?

kinook
05-16-2014, 12:34 PM
It depends. In this case, a VBScript function is the way to go.
http://msdn.microsoft.com/en-us/library/3ca8tfek

For built-in script functions in Visual Build, see
http://www.kinook.com/VisBuildPro/Manual/systemscripts.htm

For manipulating the Visual Build object model, see
http://www.kinook.com/VisBuildPro/Manual/objectmodel.htm

Shiamak
05-19-2014, 01:38 PM
Awesome....