[Gambas-user] RC2 split Function (same as in RC1, may be before also)

Mike Keehan mike_keehan at ...679...
Mon Nov 8 21:05:34 CET 2004


Charlie Reinl wrote:
> Salut Benoit,
> 
> take that line :
> 
> Picture = Picture["gambas.png"]
> 
> and split here by "="  
> 
> from sLine = "Picture = Picture[\"gambas.png\"]
> 
> you get 
> "Picture " and " Picture[\"gambas.png\"]"
> "Picture" and "Picture[\"gambas.png\"]"
> thats it, you should get .
> 
> The blanks left- and right from '=' should not be in the results.
> 
> NO?
> 
> Amicalment
> Charlie

No, I don't think so.

If the 'split' string is " = " (that is, space - equals - space) then 
you would get what you want, but splitting by "=" alone should leave 
all the other characters in the split up strings, including leading an 
trailing spaces.

If you need to get rid of the spaces, you can use Trim().

Mike.




More information about the User mailing list