i'm looking for a way to delete specific chars from a string.
The string contains of letters and digits. I want to cut the last or last 2 digits. They are always digits and always the last or last 2 digits. I know what i want to cut.
string s = lblTemperature104;
int thermometer 4;
In the above case the result should be "lblTemperature10"
Should be looking something like this. Sorry if it's hard to understand but i can't think of another way.
public void stringCutter (string s, int toCut){
s.cutFromBehind(toCut);
If you have trouble to understand my question feel free to ask. Thank you!