[SOLVED] How to extract substring from a string in C?

Status
Not open for further replies.

hukiju

Newbie level 6
Joined
Jun 28, 2012
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,381
Hi,

Anyone can teach me how to extract substring from a string in MPLAB C compiler?
For example i have a string = 'ABCDEFG', I would like to extract the 'EFG' out from that string into another variable = 'EFG'

Appreciate for any help given. Thanks!
 

Hi

you need to use strcmp and strcpy C functions and play with pointer to string.

JoseMiguel
 
Reactions: hukiju

    hukiju

    Points: 2
    Helpful Answer Positive Rating
Thanks! I did it!
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…