C # Long Substring Function

I have a string that "may" be longer than any simple int borders.

Currently, the string.substring function only accepts int parameters as index and length, which are not enough for me, since I need a long time for parameter value types.

Do you know any implementation of the function of long substrings?

Or what do you recommend to solve this possible problem with a substring with a very long string?

Thank.

+3
source share
4 answers

I have a string that "may" be longer than any simple int borders.

No, in .NET you will not have this problem. The class itself System.Stringuses Int32indexing and length properties everywhere.

, (char) 2 , , "long".

: .NET?

+6

Henk , 2 .NET(64- ).

, . - , .

0

, System.String int32....

, unsigned int, 4,300 : uint.

uint stringLength =  4,294,967,295

, int

int → -2,147,483,648 to 2,147,483,647 uint → 0 to 4,294,967,295

0
source

In addition, conventional substring algorithms may not work well at this scale (in fact, I don't know how .Substring works). You can watch it .

0
source

All Articles