c - Parsing an array of chars -


let's have "game.abc" string (array of chars) , want chars before dot. deem efficient way in c?

is "while until . copy char char" way go or there other way?

i hope question can others also.

thanks!

you can use strchr() followed strncpy() find first instance of '.' in string , copy characters before string


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -