That you wrote there will end in an error for sure since you are not allocating "var" before use. If not, the "some_free(var)" will.
The correct way should be:
Code:
void func(){
char var[32]; // 32 is arbitrary and may be any number larger than the size of "text1" + 1.
str_cpy(var,"text1");
str_cpy(var,var+2);
some_print(var) // result: xt1
}
strcpy: the simplest way you can do it is like the following
**broken link removed** (replace __PSTRING with char*).
or you can add a third parameter and pass a maximum quantity of chars to copy.