0

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;
}
1
Contributor
0
Replies
4
Views
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.