[Gambas-user] RC2 split Function (same as in RC1, may be before also)
Charlie Reinl
na2492 at ...9...
Mon Nov 8 22:05:10 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.
Sorry,
but what is the return if I split with a blank (' ')
sLine = "Picture = Picture[\"gambas.png\"] "
Picture
=
Picture[\"gambas.png\"]
' '
' '
unquated blanks have no value, so they must be striped.
Amicalment
Charlie
* Gesendet mit / Sent by: FEN-Webmail * http://www.fen-net.de *
More information about the User
mailing list