int d; d = some_string.IndexOf("something",1000);
I want indexOf
to search some_string
, starting at position 1000 and searching backwards. is this possible?
How about LastIndexOf?
From MSDN:
Reports the index position of the last occurrence of a specified String within this instance...The search begins at the startIndex character position of this instance and proceeds backwards towards the beginning until either value is found or the first character position has been examined.
int index = some_string.LastIndexOf("something", 1000);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With