Lets have a functions in C like this:
int main(){
if(1){
printf("1");
}
}
What I need is to find the function body in { }
and replace it with empty string. This bothers me because of the { }
, which can be nested infinitely. Is there a way to find bodies like this or I will have to use the stack, or some variables to store the nesting.