[KLUG Programming] substr in C?

Tony Gettig programming@kalamazoolinux.org
Mon, 21 Jul 2003 14:07:39 -0400


Quoting Bruce Smith <bruce@armintl.com>:

> > Rock on! That is great! Thanks for the clue!
> 
> If I was SCO, I'd sue you for using my code in your program.  ;-)

I don't know that I will use it exactly as it was written, but I definitely 
grasped the concept from your example and can now hopefully write something 
that doesn't generate a fatal error. :) And besides, you're too nice of a dude 
to impersonate a SCO!

Actually, you'll be able to see how I accomplish this when I post the code for 
peer review upon completion. (No NDA required. :) It's the same program I was 
talking about in the recent thread about sorting, uniq'ing, etc. There are 
other school admin types on the klug list, so maybe this will be of use to 
them (probably with modifications) when it is done.

My long term goal is to get better at C, which I've not used seriously since 
the class I took a few years ago. A majority of the open source projects seem 
to be coded in C, and I hope I can be helpful someday. The beauty of this 
current learning project is I can work on it and learn at work!

Thanks again for enlightening me on that. I wondered a couple of hours ago 
whether strncpy would get the job done, but I didn't realize you could say 
oldstring+5 and start there. Thanks again!

Tony


-- 
Tony Gettig
Voiceovers, PGP key, and more at
http://gettig.net