• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: More Java Than WebObjects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More Java Than WebObjects


  • Subject: Re: More Java Than WebObjects
  • From: "Jonathan Fleming" <email@hidden>
  • Date: Fri, 11 Jun 2004 16:39:33 +0100

From: Nathan Dumar <email@hidden>
To: Jonathan Fleming <email@hidden>
Subject: Re: More Java Than WebObjects
Date: Fri, 11 Jun 2004 09:59:04 -0400

If the real list is just like the list here, you could count the commas instead, and get the same number.

Yeah Nathan, but the user may not always supply the commas (afterthought: unless I supply the commas for the user) and if they only supply an open or closed quotation mark the counter would count the spaces in what was meant to be a phrase (effectively one word) therefore making the validation much tighter. If the quotations are closed, on-the-other-hand, then I need to skip the spaces in the quotations to count this as one word and since you have to always provide a space for a new word it seems the way to go.
If anyone has a brillant or elegant way of doing what I am trying to do, please reply with some code example.


Kind regards
Jonathan :^)

Nathan


On Jun 11, 2004, at 7:17 AM, Jonathan Fleming wrote:

What's the best way to write code that will count the spaces between each word but not prases that are sourounded by double quotation marks eg. there are 2 phrases in the example below making up a total of 6 words (6 spaces), but how can avoid counting the spaces in the phrases?:
walls, plumbing, "painting & decorating", decorating, "concrete mixing truck", concreting, bricklayers


This is the code I have so far:


_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.



  • Prev by Date: Re: Catching an exception thrown by invalid IP address
  • Next by Date: Re: More Java Than WebObjects
  • Previous by thread: Re: More Java Than WebObjects
  • Next by thread: Re: More Java Than WebObjects
  • Index(es):
    • Date
    • Thread