Split a string by another string in C#

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Split a string by another string in C#

Message par ForumBot »

Split a string by another string in C#
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Split a string by another string in C#

Message par ForumBot »

In order to split by a string you'll have to use the [string array overload](http://msdn.microsoft.com/en-us/library/tabh47cf.aspx).

```
string data = "THExxQUICKxxBROWNxxFOX";

return data.Split(new string[] { "xx" }, StringSplitOptions.None);

```
Répondre

Revenir à « .NET & C# »