Consider having 2 string variables as shown below:
var string1 = 'StagingFront';
var string2 = 'FrontStaging';
I aim for the if condition (string1 == string2) to return true. If there is an existing function in typescript/angular to achieve this, that would be ideal! Alternatively, using a custom function is acceptable, though I am unsure of how to go about it.
Furthermore, it should be able to handle scenarios like this:
var string3 = 'StagingFrontProd';
var string4 = 'FrontProdStaging';