Depending on EXACTLY what you are trying to achieve, parsing the string character by character yourself may be the most efficient in terms of processing speed. Otherwise the standard string library functions are probably the way to go as suggested in the other answers.
Most efficient copy from buffer to buffer would be:
char *in_ptr = in_string;
char *out_ptr = out_buffer;
while(*in_ptr != '.')
{
*out_ptr = *in_ptr;
in_ptr++;
out_ptr++;
}
*out_ptr = '\0';
However this risks buffer overflows.
Most efficient copy to allocated memory would probably be:
char *in_ptr = in_string;
while(*in_ptr != '.') in_ptr++;
out_string = (char *)malloc(in_ptr - in_string + 1);
memcpy(out_string, in_string, (in_ptr - in_string));
out_string[in_ptr - in_string] = '\0';
I hope my maths is correct there. It should be. You may, depending on compiler, get a slight optimisation by assigning (in_ptr - in_string) to another variable so it only gets calculated once. This second solution is almost identical to calling strchr() then memcpy(). I recommend memcpy as it saves having to replace the '.' with a null terminator, replace it afterwards, and copying the null terminator from one string to the other.
As unwind's answer (which arrived while I was writing this) all this is probably unnecessary optimisation. But nice to be aware of.