I have to handle two types of string:

```
// get application name is simple function which returns application name. 
// This can be debug version or non debug version. So return value for this
// function can be for eg "MyApp" or "MyApp_debug".

string appl = getApplicationName();
appl.append("Info.conf");

cout << "Output of string is " << appl << endl;

```

In above code `appl` is `MyAppInfo.conf` or `MyAppInfo_debug.conf`.

My requirement is whether it is debug or non-debug version I should have output of only one i.e., `MyAppInfo.conf`. How can we check for `_debug` in string and if present and how do we strip of that so that we always get output string as `MyAppInfo.conf`?