From 63c5f358e696298950dd03db431b92d4decd015a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 31 Jul 2009 07:50:54 +0000 Subject: Added a character based splitting function to FBasicString and made more of the parsing functions publicly accessible in Url, and added some more helpers. --- src/fbasicstring.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/fbasicstring.h') diff --git a/src/fbasicstring.h b/src/fbasicstring.h index b232005..6b681dd 100644 --- a/src/fbasicstring.h +++ b/src/fbasicstring.h @@ -1051,6 +1051,21 @@ namespace Bu return pFirst->pData; } + Bu::List split( const chr c ) const + { + Bu::List ret; + const_iterator l, r; + l = begin(); + for(r=l; l;) + { + for( r = l; r && r != c; r++ ); + ret.append( MyType( l, r ) ); + l = r; + l++; + } + return ret; + } + /** * Plus equals operator for FString. *@param pData (const chr *) The data to append to your FString. -- cgit v1.2.3