Hello, iv been struggling for a while on how to remove the last charactor in a string, its for a keyboard im currently making in waw, anyway, i have it so if you press backspace it removes a charactor but i csnt figure it out lol, any suggestions
Here is a more efficient answer that should work.Replace level.string with your current string.Code:removelaststring() { string = ""; for (c=0;c<level.string.size-1;c++) string += level.string[c]; level.string = string; }
removeLastChar(str)
{
str[str.size-1] = "";
return str;
}