Pieces of string
Options
Aweber
✭
I have string variables used to identify and store data in specific .txt files. however i would like to use portions of that data to further organize my text files. but I'm not certain how to store a portion of a string as another string.
EX.
VAR string Searchname:="1067 Ladder_Pth1_R1_S23";
or :="1067 Ladder_Pth7_R2_S2"
or :="1080 Liftarms_Pth3_R1_S4"
or :="1390 Liftarms_Pth6_R1_S1"
I would like to use the first 4 digits of Searchname as an identifier, say SearchID
How would i go about doing such a thing?
Something like:
VAR String SearchID := left4 of Searchname;
I'm just don't know the proper syntax
EX.
VAR string Searchname:="1067 Ladder_Pth1_R1_S23";
or :="1067 Ladder_Pth7_R2_S2"
or :="1080 Liftarms_Pth3_R1_S4"
or :="1390 Liftarms_Pth6_R1_S1"
I would like to use the first 4 digits of Searchname as an identifier, say SearchID
How would i go about doing such a thing?
Something like:
VAR String SearchID := left4 of Searchname;
I'm just don't know the proper syntax
0
Comments
-
Use function StrPart, it will store the characters into another string variable. You specify the start position and the length, which sounds just like what you are asking.Lee Justice1
-
Totally worked, exactly what I needed. Thank you!!0
Categories
- All Categories
- 5.4K RobotStudio
- 385 UpFeed
- 15 Tutorials
- 12 RobotApps
- 291 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 247 ScreenMaker
- 2.7K Robot Controller
- 285 IRC5
- 47 OmniCore
- 6 RCS (Realistic Controller Simulation)
- 3 RobotStudio AR Viewer
- 748 RAPID Programming
- 15 Wizard Easy Programming
- 110 Collaborative Robots
- 3 Job listings