Left string command

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
cvlr
Newbie
Posts: 18
Joined: Thu Jun 07, 2018 4:40 pm

Left string command

Post by cvlr » Mon Jun 11, 2018 2:27 pm

There does not appear to be a Left(number of characters) command. I use the midstr command but it's clunky when all I want to do is strip the left few or right few characters off of something.

User avatar
JRL
Automation Wizard
Posts: 3500
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Left string command

Post by JRL » Tue Jun 12, 2018 2:30 am

Maybe I've been using it too long but I don't find MidStr> clunky at all. That said, if you want "left" and "right" functions, you can easily use them in VBScript via VBEval>

Code: Select all

Let>vStr=ManyPathsToTread

VBEval>left("%vStr%",9),res
MDL>res

VBEval>Right("%vStr%",7),res
MDL>res


Midstr>vStr,1,9,res
MDL>res

Midstr>vStr,10,7,res
MDL>res

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts