14.09.2019, 19:21
Really nice tutorial, well explained! +REP
About the other thing you asked, i don't get what are you asking for, your code should work already, you just need to declare
inside the callback
Quote:
Okay, i want to ask something..
How can i determine if this string having an underscore and i'm want to delete with strdel? |
Code:
new string[] = "Hello_Hello"; str_replace("_","",string); print(string); //Will output "HelloHello" stock str_replace(needle[], replace[], haystack[]) //By JaTochNietDan { new index = strfind(haystack, needle, true); while(index != -1) { strdel(haystack, index, index + strlen(needle)); strins(haystack, replace, index, strlen(haystack)); index = strfind(haystack, needle, true); } }
Code:
new txt[10]; //Depending on how much characters you need on this string