home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!mcsun!sunic!kth.se!dront.nada.kth.se!d88-jwa
- From: d88-jwa@dront.nada.kth.se (Jon W{tte)
- Subject: Re: Comparing strings 'n stuff...
- In-Reply-To: chuck@gte.com's message of 28 Aug 92 16:42:01 GMT
- Message-ID: <D88-JWA.92Aug28200534@dront.nada.kth.se>
- Followup-To: comp.sys.mac.programmer
- Originator: d88-jwa@dront.nada.kth.se
- Sender: usenet@kth.se (Usenet)
- Nntp-Posting-Host: dront.nada.kth.se
- Organization: Royal Institute of Technology, Stockholm, Sweden
- References: <1992Aug28.134804.9876@sun1x.actc.res.utc.com>
- <chuck-280892124136@choffman.gte.com>
- Date: Fri, 28 Aug 1992 19:05:34 GMT
- Lines: 20
-
- > chuck@gte.com (Chuck Hoffman) writes:
-
- > I am trying to compare a Str255 with a String which exists
- > in my resource file. I have loaded it in, but I am at a loss
- > as to what to do to compare these two strings to see if they
-
- If you are using THINK C, there are two routines for converting between
- strings of Pascal format (with length byte at the beginning) and C format
- (with null character at the end). They are "PtoCstr" and "CtoPstr". If
- you get both strings into C format, then you can use the C library routine
- "strncmp" to compare them, even if they are of dissimilar length.
-
- And of course lose any credibility outside of the U.S.
-
- Use IUEqualString, IUCompString and IUMagIDString
-
- --
- Jon W{tte, h+@nada.kth.se, Sweden, Phone +46-8-107069
- White, Literate, Employed, Higher-educated, Male and Not Poor.
- Can I be a good guy nevertheless?
-