Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.msdos.programmer > #3213
| From | "Kerr-Mudd,John" <notsaying@invalid.org> |
|---|---|
| Newsgroups | comp.os.msdos.programmer |
| Subject | Re: scan for a-z |
| Date | 2019-04-02 09:06 +0000 |
| Organization | dis |
| Message-ID | <XnsAA2566E2FEE19admin127001@144.76.35.198> (permalink) |
| References | <ja45aepid2pe3kgka19s1011br325ph479@4ax.com> <q7v1bf$1q0f$1@gioia.aioe.org> |
On Tue, 02 Apr 2019 07:00:38 GMT, "R.Wieser" <address@not.available>
wrote:
> T,
>
>> I guess there's no efficient way of doing this, without looking
>> at each character, one by one.
>
> Pray tell, how can you make sure that none of the cookies in a jar is
> a chocolate-chip one (which you crave and want to eat) without
> examining them one-by-one ? :-)
>
>> but 90% of my data is already uppercase, and there's a lot of data,
>> so that's a lot of wasted cycles.
>
> Easy: Just remove that 90% from the string and you will get a 100%
> conversion rate.
>
> How you c|should remove that 90% ? I haven't got the foggiest.
> Probably by checking all characters one-by-one and weed the
> already-uppercase ones out ... :-)
>
> In other words, you're making a problem of something that cannot be
> solved in any other way (than maybe, just /maybe/, by handling
> multiple chars at a time, filling out a 16/32 bit register ...)
>
> The easiest/fastest way to check each of those characters (lodsb) is
> subtract ('a') and compare (26). If equal-or-higher (not a lower-case
> char) jump to advance to the next char. Otherwise add ('A') and store
> (at esi-1) (and than advance).
>
> Regards,
> Rudy Wieser
>
>
IAWTP, but, to narrowly follow your spec, you could 'OR' all the chars
together, if result >0x20 then you have at least 1 lowercase char, so
must invoke a conversion rtn.
--
Bah, and indeed, Humbug.
Back to comp.os.msdos.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
scan for a-z T. Ment <t.ment@protocol.invalid> - 2019-04-01 22:43 +0000
Re: scan for a-z "Alexei A. Frounze" <alexfrunews@gmail.com> - 2019-04-01 21:04 -0700
Re: scan for a-z T. Ment <t.ment@protocol.invalid> - 2019-04-02 16:31 +0000
Re: scan for a-z Steve Nickolas <usotsuki@buric.co> - 2019-04-02 12:40 -0400
Re: scan for a-z T. Ment <t.ment@protocol.invalid> - 2019-04-02 16:48 +0000
Re: scan for a-z Rod Pemberton <invalid@lkntrgzxc.com> - 2019-04-02 18:03 -0400
Re: scan for a-z Peter 'Shaggy' Haywood <phaywood@alphalink.com.au> - 2019-04-17 23:56 +1000
Re: scan for a-z "R.Wieser" <address@not.available> - 2019-04-02 09:00 +0200
Re: scan for a-z "Kerr-Mudd,John" <notsaying@invalid.org> - 2019-04-02 09:06 +0000
Re: scan for a-z "R.Wieser" <address@not.available> - 2019-04-02 14:37 +0200
Re: scan for a-z Herbert Kleebauer <klee@unibwm.de> - 2019-04-02 12:39 +0200
Re: scan for a-z "Kerr-Mudd,John" <notsaying@invalid.org> - 2019-04-02 14:27 +0000
Re: scan for a-z Herbert Kleebauer <klee@unibwm.de> - 2019-04-02 20:17 +0200
Re: scan for a-z "Kerr-Mudd,John" <notsaying@invalid.org> - 2019-04-02 19:16 +0000
Re: scan for a-z wolfgang kern <nowhere@never.at> - 2019-04-03 16:13 +0200
Re: scan for a-z T. Ment <t.ment@protocol.invalid> - 2019-04-03 19:36 +0000
Re: scan for a-z "Kerr-Mudd,John" <notsaying@invalid.org> - 2019-04-04 14:43 +0000
Re: scan for a-z wolfgang kern <nowhere@never.at> - 2019-04-05 00:41 +0200
Re: scan for a-z JJ <jj4public@vfemail.net> - 2019-04-02 19:53 +0700
Re: scan for a-z Mateusz Viste <mateusz@cant.remember> - 2019-04-02 13:00 +0000
Re: scan for a-z T. Ment <t.ment@protocol.invalid> - 2019-04-02 16:44 +0000
Re: scan for a-z Rod Pemberton <invalid@lkntrgzxc.com> - 2019-04-02 18:04 -0400
Re: scan for a-z "Kerr-Mudd,John" <notsaying@invalid.org> - 2019-04-03 09:31 +0000
Re: scan for a-z "Alexei A. Frounze" <alexfrunews@gmail.com> - 2019-04-03 02:48 -0700
Re: scan for a-z "Kerr-Mudd,John" <notsaying@invalid.org> - 2019-04-03 12:25 +0000
Re: scan for a-z Rod Pemberton <invalid@lkntrgzxc.com> - 2019-04-03 18:05 -0400
Re: scan for a-z Bogus@Embarq.com (Steve) - 2019-04-03 11:58 +0000
Re: scan for a-z wolfgang kern <nowhere@never.at> - 2019-04-03 15:58 +0200
Re: scan for a-z wolfgang kern <nowhere@never.at> - 2019-04-03 16:05 +0200
Re: scan for a-z "R.Wieser" <address@not.available> - 2019-04-03 17:40 +0200
Re: scan for a-z "R.Wieser" <address@not.available> - 2019-04-03 17:47 +0200
csiph-web