c# - Get the index of the nth occurrence of a string? -


unless missing obvious built-in method, quickest way nth occurrence of string within string?

i realize loop indexof method updating start index on each iteration of loop. doing way seems wasteful me.

that's need - or @ least, it's easiest solution. you'd "wasting" cost of n method invocations - won't checking case twice, if think it. (indexof return finds match, , you'll keep going left off.)


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -