RE: [CFCDev] Check for Empty Strings in Required String Arguments

2004-12-03 Thread Kerry
Personally, I would return an empty array, with one empty element, the rationale being: if you passed it: 12345qwerty you would get back exactly what you passed in, but as the first element in an array. so if you passed it: [empty string] shouldnt the behaviour be the same? (not that cold

Re: [CFCDev] Check for Empty Strings in Required String Arguments

2004-12-03 Thread Gary Menzel
It would depend on a couple of things.. (but this is just a general principal - not a comment on CFMX actual behaviour) 1. IF an empty string was an invalid input (i.e. you just should NOT be having an empty string at that point) - you should check for it in the function and throw the error

Re: [CFCDev] Check for Empty Strings in Required String Arguments

2004-12-03 Thread Patrick McElhaney
I think Kerry's rationale makes sense. But I think if your function ignores trailing empty spaces you can get away with returning an empty array for an empty string. I think an empty array is much more likely to yield expected results especially in the context of web development and CF.

RE: [CFCDev] Check for Empty Strings in Required String Arguments

2004-12-03 Thread Nando
. At least that's what i've found to be the most helpful guide. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Gary Menzel Sent: Friday, December 03, 2004 9:05 PM To: [EMAIL PROTECTED] Subject: Re: [CFCDev] Check for Empty Strings in Required String Arguments

RE: [CFCDev] Check for Empty Strings in Required String Arguments

2004-12-03 Thread Adam Cameron
Title: RE: [CFCDev] Check for Empty Strings in Required String Arguments Personally, I would return an empty array, with one empty element, the rationale being: ... shouldnt the behaviour be the same? (not that cold fusion agrees with this rationale...) With these things, I always try

Re: [CFCDev] Check for Empty Strings in Required String Arguments

2004-12-03 Thread Gary Menzel
Just a note. I was talking generally about the different approaches you might take to decide how deal with any situation to make the decision. Not that split function or CFMX behaviour. I could have been clearer about that. Gary [PS - but it was 6am after having had only 4 hours sleep