I've learned to find the index number of a specific character within a string by writing
dIndex = myText.IndexOf("|")
Obviously, this start counting left to right. But I'd like to do the same but start counting from the right side of the string to the left to find the character. Can this be done in VB?
If not, here's my delima:
I'm using a ComboBox that will house a list of printers to choose from. This will be populated from info in a data table. In the string of information in the ComboBox, I've put a "|" to indicate that the next character(s) will be the PrinterID (key) from the data table. Preceeding this character are multiple spaces so these characters won't be seen when the user uses the ComboBox. Since I don't know if the PrinterID will be '1' or '10' or '100', I've got to parse this number out.
In thinking out loud, if I can find the length of the string (lets call this 'sLength') and then the number of characters to the "|" (dIndex), I can do simple subtraction to find the number of "right" characters.
So, is there a "length" command to find the total number of characters in the string?
In advance, thanks.