[kepler-users] string splitter

Corinna Gries cgries at wisc.edu
Thu Jun 10 12:20:45 PDT 2010


Hi Madhu,

when I run the attached workflow the output is this:

{"6/19/2009", "CEW", "", "6/10/2009", "6", "1", "1000", "52.5", "31", 
"1", "1", "1.017410714", "0.625589286", "1.3125"}

and it is missing the empty string in position 14. I think you may have 
had a space after the last comma, which made it work just fine.

Corinna

Madhusudan Gujral wrote:
> Hi Corinna,
>
> I passed the splitter results to dsplay actor. What I observe if following
> {"6/19/2009", "CEW", "", "6/10/2009", "6", "1", "1000", "52.5", "31", "1", "1", "1.017410714", "0.625589286", "1.3125", "", " "}
>
> It has elements 14 'No Space' and 15 'Space' displayed correctly. When I used Array Element actor to display the values for element 14, 15, it does not complain, but there is nothing to show. 
>
> My guess is that the problem is related to post processing (processing the empty tokens).
>
> Thanks
> --Madhu
>
> ________________________________________
> From: kepler-users-bounces at kepler-project.org [kepler-users-bounces at kepler-project.org] On Behalf Of Corinna Gries [cgries at wisc.edu]
> Sent: Thursday, June 10, 2010 11:31 AM
> To: Kepler User
> Subject: [kepler-users] string splitter
>
> Hi again,
>
> when I am running this line of data:
> 6/19/2009,CEW,,6/10/2009,6,1,1000,52.5,31,1,1,1.017410714,0.625589286,1.3125,,
>
> through the string splitter, splitting it on ',' it omits the last empty
> string, i.e. does not pass an empty string. Trying to read the array
> element in position 14 throws an error rather than returning an empty
> string, which is what I had expected.
>
> I can work around it by just adding something to end of the line but is
> that an otherwise meaningful behavior?
>
> Corinna
> _______________________________________________
> Kepler-users mailing list
> Kepler-users at kepler-project.org
> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users
>   
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stringSplitter.xml
Type: text/xml
Size: 25930 bytes
Desc: not available
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20100610/f5851667/attachment.xml>


More information about the Kepler-users mailing list