Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Looking for examples to split string into container
Looking for examples to split string into container [message #55309] Wed, 28 October 2020 17:15 Go to previous message
sinpeople is currently offline  sinpeople
Messages: 29
Registered: October 2020
Location: Singapore
Promising Member

Hi Folks,

I am looking for a sample code to split a string according to a set of predefined deliminator, which is very similar to the following C# code.
char[] delimiterChars = { ' ', ',', '.', ':', '\t' };

string text = "one\ttwo three:four,five six seven";
System.Console.WriteLine($"Original text: '{text}'");

string[] words = text.Split(delimiterChars);
System.Console.WriteLine($"{words.Length} words in text:");

foreach (var word in words)
{
    System.Console.WriteLine($"<{word}>");
}


Thank you so much!

Best Regards
David WANG
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Vector a user defined struct for XML persistency
Next Topic: Convert struct to string and reconstruct a struct from string
Goto Forum:
  


Current Time: Fri Jun 13 16:53:41 CEST 2025

Total time taken to generate the page: 0.04657 seconds