Exemple #1
0
		void wsplit( TVectorWString & _outStrings, const WString& _str, bool _trimDelims, const WString& _delims )
		{
			uint32_t numSplits = 0;
			WString::size_type start = 0;
			WString::size_type pos = 0;

			do 
			{
				pos = _str.find_first_of(_delims, start);
			
				if (pos == WString::npos )
				{
					_outStrings.push_back( _str.substr(start) );
					break;
				}
				else
				{
					_outStrings.push_back( _str.substr(start, pos - start) );
					start = pos + 1;
				}

				if( _trimDelims == true )
				{
					start = _str.find_first_not_of(_delims, start);
				}

				++numSplits;

			} while (pos != WString::npos);
		}