Click here to Skip to main content
15,891,375 members
Articles / Desktop Programming / ATL

STL Split String

Rate me:
Please Sign up or sign in to vote.
4.33/5 (18 votes)
1 Feb 20062 min read 291.6K   77.2K   41  
A function that will split an input string based on a string delimiter.
#ifndef __STRINGUTILS_H_
#define __STRINGUTILS_H_

#include <string>
#include <vector>

using namespace std;

class StringUtils
{

public:

	static int SplitString(const string& input, const string& delimiter, vector<string>& results, bool includeEmpties = true);

};

#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions