L
L
LottoL2018-05-28 16:31:08
C++ / C#
LottoL, 2018-05-28 16:31:08

How to do without the split function?

Hello.
Like any newbie, a stupid but necessary question arises:

string s = TextBox.Text;
string[] sarr = s.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
int kol = sarr.Length;
arr = new int[kol];
for (int i = 0; i < kol; i++) 
{
    arr[i] = Convert.ToInt32(sarr[i]);
}

How to implement splitting a string into substrings without using a built-in function? Help me please. I will be grateful.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question