G
gc260262
Hi,
I need functions that would return null terminated strings for me, for
example:
char *HTMLi(const char *string)
This function receives a pointer to a null terminated string, and
should return <i>This was the string</i>.
To make it more complex, I could even return the result of the above
function to this:
char *HTMLb(const char *string)
As a result, this is what I expect to have <b><i>This was the
string</i></b>
How about allocating memory; I assume if I allocate memory in these
functions, and never free it, this is a so called memory leak.
Does somebody has a sample code for me having the same logic? Your
feedback is really appreciated!
Thanks,
I need functions that would return null terminated strings for me, for
example:
char *HTMLi(const char *string)
This function receives a pointer to a null terminated string, and
should return <i>This was the string</i>.
To make it more complex, I could even return the result of the above
function to this:
char *HTMLb(const char *string)
As a result, this is what I expect to have <b><i>This was the
string</i></b>
How about allocating memory; I assume if I allocate memory in these
functions, and never free it, this is a so called memory leak.
Does somebody has a sample code for me having the same logic? Your
feedback is really appreciated!
Thanks,