Re: Function to Upper and Lower Case sentences

2011-12-22 Thread J. Landman Gay
On 12/21/11 7:00 PM, Sivakatirswami wrote: well I got this far.. I tinkered with this a little bit last night because I thought a regex solution would work, but my skills aren't good enough. So I ended up with something similar to what you've already done. #I think there is a better trim l

Re: Function to Upper and Lower Case sentences

2011-12-21 Thread Sivakatirswami
well I got this far.. in my "hokey-baby" xTalk way of coding...but it works well enough to keep one or two donors from "screaming" with all caps in their comments... but someone was entering dates like this: 12.21.2012 in his comments my script munges these to 12212012.. and it doesn't deal

Re: Function to Upper and Lower Case sentences

2011-12-21 Thread Pete
Came across another corner case - a quotation at the end of a sentence, eg: Mark said, "You don't know what you're talking about!" This could be a real nightmare! On Wed, Dec 21, 2011 at 2:09 PM, Mark Wieder wrote: > Pete- > > Wednesday, December 21, 2011, 2:00:57 PM, you wrote: > > > Or a clo

Re: Function to Upper and Lower Case sentences

2011-12-21 Thread Bob Sneidar
(Me too!) On Dec 21, 2011, at 2:00 PM, Pete wrote: > Or a close paren? Seems like modern English usage is to put the period > before the close paren at the end of a sentence (although I personally hate > that). > > On Wed, Dec 21, 2011 at 1:30 PM, J. Landman Gay > wrote: > >> On 12/21/11 3:02

Re: Function to Upper and Lower Case sentences

2011-12-21 Thread Mark Wieder
Pete- Wednesday, December 21, 2011, 2:00:57 PM, you wrote: > Or a close paren? Seems like modern English usage is to put the period > before the close paren at the end of a sentence (although I personally hate > that). I believe that's the traditional approach and it's been changing over time t

Re: Function to Upper and Lower Case sentences

2011-12-21 Thread Pete
Or a close paren? Seems like modern English usage is to put the period before the close paren at the end of a sentence (although I personally hate that). On Wed, Dec 21, 2011 at 1:30 PM, J. Landman Gay wrote: > On 12/21/11 3:02 PM, Sivakatirswami wrote: > >> OK yes, Title case is easy... It's se

Re: Function to Upper and Lower Case sentences

2011-12-21 Thread Bob Sneidar
I did something similar recently, where not only was the delimiter important, but preserving the exact delimiter was also important. In my case it was breaking out the parts of a query that might contain AND or OR. What I did was: replace " AND " with cr & " AND " & cr in theList replace " OR "

Re: Function to Upper and Lower Case sentences

2011-12-21 Thread J. Landman Gay
On 12/21/11 3:02 PM, Sivakatirswami wrote: OK yes, Title case is easy... It's sentence case I was looking for because a period/dot is not part of a word. I guess one could use a dot as a line delimiter and then step thru the lines. Seems like there should be some kind of fancy regex to do this,

Re: Function to Upper and Lower Case sentences

2011-12-21 Thread Pete
I think he's looking for something to capitalize the first char of each sentence, not of each word. On Wed, Dec 21, 2011 at 12:57 PM, Bob Sneidar wrote: > >end repeat -- Pete Molly's Revenge ___ use-livecode mail

Re: Function to Upper and Lower Case sentences

2011-12-21 Thread Sivakatirswami
OK yes, Title case is easy... It's sentence case I was looking for because a period/dot is not part of a word. I guess one could use a dot as a line delimiter and then step thru the lines. On 12/21/11 10:57 AM, Bob Sneidar wrote: On Dec 21, 2011, at 12:43 PM, Sivakatirswami wrote: I have a

Re: Function to Upper and Lower Case sentences

2011-12-21 Thread dunbarx
: Sivakatirswami To: How to use LiveCode Sent: Wed, Dec 21, 2011 10:45 am Subject: Function to Upper and Lower Case sentences I have a need to take all caps input and 1) Lower case all but first letter of sentences 2) Upper case words in a small dictionary I will provide to the function.

Re: Function to Upper and Lower Case sentences

2011-12-21 Thread Bob Sneidar
On Dec 21, 2011, at 12:43 PM, Sivakatirswami wrote: > I have a need to take all caps input and > > 1) Lower case all but first letter of sentences > > 2) Upper case words in a small dictionary I will provide to the function. > > As anyone cooked up something like this already... if I just had

Function to Upper and Lower Case sentences

2011-12-21 Thread Sivakatirswami
I have a need to take all caps input and 1) Lower case all but first letter of sentences 2) Upper case words in a small dictionary I will provide to the function. As anyone cooked up something like this already... if I just had 1) can manage 2) Happy Holidays! Om Shanti Sivakatirswami Kau