V
V
Vimake2014-01-09 19:07:37
C++ / C#
Vimake, 2014-01-09 19:07:37

How to implement text splitting in c#?

There is a text like elephant=trunk.
It is necessary to separate:
the elephant is entered into the variable animal
and the trunk is feature.
How to implement in c#?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2014-01-09
@Vimake

It is possible in different ways. For example like this:

string str = "слон=хобот";
string [] split = str.Split(new Char [] {'='});
animal = split[0];
feature = split[1];

Or use IndexOf().

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question