On 06/06/11 09:25, Caveat wrote: > You're asking the wrong question. What you meant to ask was whether > anyone thought it necessary to include that functionality in the > language itself. > > Splitting your string on "AE" is easily done, for example: > > DIM aString AS String > DIM strings AS String[] > aString = > "AE300AE318AE65AEBuddiesAE302AE319AE300AE319AE7AEclassybabe27_742AE301AE319AE303AE319AE301AE318AE300AE318AE65AEFriendsAE302AE319AE300AE319AE7AEleet.spikeAE301AE319AE303AE319AE301AE318AE303AE318AEAE300AE312AE313AE2AE314AE0AE301AE312AE300AE312AE313AE6AE314AE > - 1 > AE301AE312AE300AE312AE313AE4AE314AE0AE301AE312AE300AE312AE313AE8AE314AE1AE301AE312AE300AE312AE313AE9AE314AE900AE301AE312AE303AE312AE" > aString = Replace(aString, "AE", "{") > strings = Split(aString, "{") > FOR EACH aString IN strings > PRINT aString > NEXT > > We are a friendly bunch here on the Gambas user list, please try and > keep it that way, even if sometimes a particular problem frustrates you. > > Also please don't forget that the Gambas language is a labour of love > and that it's FREE, before you ask for your money back ;-) > > Kind regards, > Caveat >
One thing that I have found helpful (as in making the code more robust) is to use one of the older and mainly obsolete lower invisible ASCII characters (e.g "RS" or "FS" i.e. Chr()'s 28-31 ) as the replacement delimiter, they have less chance of showing up in an externally supplied string. ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user