View Single Post
Old Jun 3rd, 2006, 7:38 PM   #5
Adak
Hobby Coder
 
Join Date: May 2006
Posts: 58
Rep Power: 0 Adak is an unknown quantity at this point
Quote:
Originally Posted by Prm753
Hi again.

I have searched high and low for this but have found nothing really pertaining to what I want to do. Is there a function that will let you get at a specified position in a string? Not at the beginning or end, but at say, the middle. For example, if I had the string: "My name is Paul." and I wanted to get to the 6th character, how might I go about doing that if there is no such function to do it? (Without manually changing the string in the compiler)

Thanks in advance.
Use pointer arithmetic to increment from the string's base address, up to whatever letter you want.

You're not searching for a substring, just "walking" up the string, right?

Adak
Adak is offline   Reply With Quote