[Gambas-user] Unable to split string containing ascii characters

Caveat Gambas at ...1950...
Mon Jun 6 01:55:08 CEST 2011


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

On Sun, 2011-06-05 at 19:15 -0400, Titan Rain wrote:
> So in 12 years of development no one has ever thought it might be necessary to split a string by more than one character?
> 
> ------------------------------------------------------------------------------
> 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 at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user






More information about the User mailing list