Pieces of string
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.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 798 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings