Home > Net >  How c # in the array index of a set of characters
How c # in the array index of a set of characters

Time:11-26

I have an array myarr. There were more than 5000 elements, how to find out a set of specific characters in it at the beginning of the position of the element?
If myarr element has the following contents, a total of more than 5000 elements:
The OUTPUT/F name of (1), T (LOC10__Y) SDFSDF
Name of the F (1)=FEATSDFSF
T (LOC10__Y)=TOL/CORTOL, S
The OUTPUT/FA name of (1), TA (LOC10__Y)
FA (name) 1=FEAT/POINTSDF
TA (LOC10__Y)=TOL/CORTOL
The OUTPUT/F (2) name, T (LOC22__Z)
F (2) name=FEAT/POINT, CSFFSF
T (LOC22__Z)=TOL/CORTOL
The OUTPUT/FA (2) name, TA (LOC22__Z), FFSSF
FA (2) name=FEAT/POINT,
TA (LOC22__Z)=TOL/CORTOL, ZAXIS, 0., INTOL
.

I now want to index according to the OUTPUT/F 1 (name) element position, need not traverse the how to write?

CodePudding user response:

Regular expressions or string. IndexOf

CodePudding user response:

reference 1/f, guiyang horse Ma Shanfu plugging waterproof engineering professional maintenance of swimming pool response:
regular expressions or string. The IndexOf

Index can't fuzzy matching, regular expressions need to traverse, more than 5000 array elements, traverse up particularly slow,

CodePudding user response:

Linq query results index

https://www.cnblogs.com/shuyuea3/p/LinqQueryIndex.html

CodePudding user response:

LINQ how to access an element in a set of index
https://codedefault.com/2018/how-to-get-index-using-linq-in-csharp-application
  •  Tags:  
  • C#
  • Related