I’m trying to split a string into 2 subs. The first contains the first 236 (0 to 235) chars and the second one from 237 to the end of the string.
firststr = str.Substring(0, 235)
secondstr = str.Substring(235, strLength) 'strLength is the total length of the string
strLength is generating error : Index and length must refer to a location within the string.
Parameter name: length
Any help?
You need something like this:
Because strLength is the length of the entire string, and you’re starting at position 235, you’re going past the end of the string.