Usage:: [B]ir_strcpy[/B]( [I]destination[/I], [I]source[/I], [I]range_begin[/I], [I]range_end[/I]);
example:
char test[] = "Hello World!!!";
char test2[20];
ir_strcpy(test2, test, 1, 3); /* test2 now contains 'ell' */
Usage:: [B]ir_strcpy[/B]( [I]destination[/I], [I]source[/I], [I]range_begin[/I], [I]range_end[/I]);
example:
char test[] = "Hello World!!!";
char test2[20];
ir_strcpy(test2, test, 1, 3); /* test2 now contains 'ell' */
/**
@author: Mathias Van Malderen (tux4life)
*/
void ir_strcpy( char *s1, const char *s2, int rb, int re )
{
while( (rb <= re) && (*s1++ = s2[rb]) ) rb++;
*s1 = 0;
}
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.