Hello,
a question again.
What`s the best method if I have a string like this:
"Charlie is going into a bar"
and I would change only the "b" to a "c" ?
Thanks for any help
Chris
Known as: SYSOP@apd.insider.sub.de 8.5 GBytes Online
Christian_Benner%2:245/6613.8 Mailbox: +49 6384 7582
You can use the function strchr to find the first occurence of a character
in a string. In your example :
ptr = strchr ( string, 'b' ) ;
if ( ptr )
*ptr = 'c' ;
where string is a pointer to your text string and ptr is pointer to a
character.
Peter Wade
Autopiloting from London, England