Using strchr to build a string
Posted
by Roel
on Stack Overflow
See other posts from Stack Overflow
or by Roel
Published on 2010-06-05T12:22:13Z
Indexed on
2010/06/05
12:32 UTC
Read the original article
Hit count: 387
I have the following:
LPSTR email // Has data in it already
LPSTR index=strchr(email,'@');
Now I want to Insert into a new string:
LPSTR username
the part of "email" from the beginning of the string to "index".
For example: email="[email protected]" so username="roel" .
Is there a function to do it quick or do I need to build one?
Roel
© Stack Overflow or respective owner