while (*s++ = ((*t & 0x60) == 0x40 ? *t ^ 0x20 : *t)) t++;
-
It turns a string to lower case? edit: that is, it copies a string to s as lower case (but I'm still not actually sure)
someone who knows his ASCII :)
Agh! Reality! My Archnemesis![^]
| FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy -
someone who knows his ASCII :)
Agh! Reality! My Archnemesis![^]
| FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy -
It's turning into one of 'those' Friday afternoons. Any takers for what this gem does?
Regards, Rob Philpott.
-
It's turning into one of 'those' Friday afternoons. Any takers for what this gem does?
Regards, Rob Philpott.
Copying string, turning upper case into lower case...
-
It's turning into one of 'those' Friday afternoons. Any takers for what this gem does?
Regards, Rob Philpott.
increment the address of s set the value of s to the value of t and increment t. the value of t is dependent on the if statement. AND the value of t with 0x60 and if bit 6 is set, make the value of s = the value of t exclusive ored with 32,otherwise set s to the value of t... then increment the address of t. do this until the value of s is not true.
modified on Monday, August 30, 2010 9:33 AM
-
It's turning into one of 'those' Friday afternoons. Any takers for what this gem does?
Regards, Rob Philpott.
I used to write my code like this until my boss beat me with stick and took my coffee cup :laugh:
-
Cause a developer to get fired? Or at least a stern talking to?
Yesterday they said today was tomorrow but today they know better. - Poul Anderson
Trying to figure this out, will causes someone to lose more productive than the multi-monitor/multi-tasking debate. ;P
-
I used to write my code like this until my boss beat me with stick and took my coffee cup :laugh:
I remember using this technique for an assembly program I wrote many years ago. When I worked out what it was doing, it took a moment to realize why it look familiar... Andreas Mertens
-
It turns a string to lower case? edit: that is, it copies a string to s as lower case (but I'm still not actually sure)
It definitely returns a string with all lowercase characters.
-
It's turning into one of 'those' Friday afternoons. Any takers for what this gem does?
Regards, Rob Philpott.
wastes a lot of peoples time on this site ?
-
It's turning into one of 'those' Friday afternoons. Any takers for what this gem does?
Regards, Rob Philpott.
-
It's turning into one of 'those' Friday afternoons. Any takers for what this gem does?
Regards, Rob Philpott.
-
It's turning into one of 'those' Friday afternoons. Any takers for what this gem does?
Regards, Rob Philpott.
It corrupts strings with @ [ \ ] ^ and _ in them.
Neil Hudson
-
Copying string, turning upper case into lower case...
-
Rob Philpott wrote:
Any takers for what this gem does?
Why that's obvious. It makes you hate the coder who spewed it into your source.
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
I was going to say "Hopefully get someone sacked". Maybe a bit harsh on my part.
-
It definitely returns a string with all lowercase characters.
Larry G. Grimes wrote:
It definitely returns a string with all lowercase characters.
It'll change other characters too, such as '@' to '`'!
-
Worked for ANSI to, albeit only the lower parts :rolleyes:
-
It's turning into one of 'those' Friday afternoons. Any takers for what this gem does?
Regards, Rob Philpott.
maybe the author should start writing normal code.. in c#, this would be done with s.ToLower() yeah.. thats it.. no non-sense pointer code with an inline loop referencing hex values
-
Worked for ANSI to, albeit only the lower parts :rolleyes: