For the life of me I cannot find a function that extracts a substring from an existing string. The closest I could find was SearchSplit String and Replace Substring, but neither of them do what I want.
This is what I want to do:
Assuming a string "Test String", the letters are in positions as follows:
T e s t _ S t r i n g
0 1 2 3 4 5 6 7 8 9 10
Now extact substring from offset 5 to position 7 (Length 3):
Substring = S t r
5 6 7
In Java, for example, you can easily do this using the code below:
String str = "Test String";
String subString = str.substring(5,7);
Is there no simple function to do this in LabVIEW? If not, what's the easiest way to do this?
Solved! Go to Solution.
Use String Subset with index 5 and length 3.
Oh perfect. Thank you. I was hunting through the Strings Pallette and that one didn't catch my eye. What the world is a "string subset"? Couldn't they just give the String Functions normal String Function names like other languages?
Either way, thanks! That did what I was looking for!