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 » about the behaviour of the Split() function
about the behaviour of the Split() function [message #3019] Wed, 03 May 2006 18:06 Go to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

the Split() function is helping me to parse a record. Just now I discovered that the number of fields in a record/row to be parsed
   Vector<String> field = Split( playerstr, ';');
   n = field.GetCount();
   ...

doesn't consider as a field the case of consecutive ';' . So while I believed (and wanted) that the string

"aaaa; bbbb; cccc;;eeee"

had 5 fields, Split() instead counts only 4. Is it normal?

Luigi
Re: about the behaviour of the Split() function [message #3020 is a reply to message #3019] Wed, 03 May 2006 18:58 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Yes:

Vector<String> Split(const char *s, int chr, bool ignoreempty = true);

Note the additional "ignoreempty" paremater and its default value...

Mirek
Previous Topic: Can we consider Regex "under development"?
Next Topic: Switch with String type variables
Goto Forum:
  


Current Time: Fri May 03 20:53:46 CEST 2024

Total time taken to generate the page: 0.02959 seconds