Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

testing a delimeter

 
ben riches
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
could someone please help me?
how can i test to see if the last token is a delimeter or not,
and if it is a delimeter (comma) i want to read it in as a blank string.
for example: ben,riches,
now i want three tokens.
ben
riches
"empty string"
also if the line starts with a comma i want it to print out a empty string.
could someone please give me some ideas?
thanks
ben
 
Shane Roylance
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using 1.4, I think this will do it:
 
ben riches
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no i am not using 1.4.
i am using 1.3
any suggestions
 
Neil Laurance
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One way to do this:

Cheers Neil
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic