home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!newsserver.pixel.kodak.com!laidbak!tellab5!vpnet!mox
- From: mox@vpnet.chi.il.us (William Moxley)
- Subject: Checking variables for characters & Copying portions of strings
- Message-ID: <1992Jul27.151345.3124@vpnet.chi.il.us>
- Organization: Vpnet Public Access
- Date: Mon, 27 Jul 1992 15:13:45 GMT
- Lines: 21
-
-
- Sorry if this question seems to be a bit basic, I'm new at this...
-
- I'm adding an editing feature to a little database I wrote. I need
- to be able to see if a certain variable has anything but whitespace
- in it. (So that you can just hit enter past some of the fields
- instead of having to retype everything) How can I do this? I've
- tried strlen and sizeof, but they just tell me how big the string
- is defined for.
-
- Also, an unrelated question. How can you copy a portion of a string
- into another? What I want to do is to take a part out of the middle
- section of string 1, and put it in the middle section of string 2.
- I've looked at strncpy, but I don't know if/how it's possible to
- make it start from the middle of a string.
-
- Any help will greatly be appreciated. And if it matters, I'm using
- Borland C++ on an IBM compatible machine.
-
- William Moxley
- mox@vpnet.chi.il.us
-