just use the ternary operator in the switch statement
switch (code.StartsWith("FF")? code.substring(0,2): code) { case "FF": case "FAS": case "FAY"
for brevity, do the following:
switch (new[] {"FF", "GG", "HH", "JJ"}.Contains(code.substring(0,2))? code.substring(0,2): code) { case "FF": case "GG": case "HH": case "JJ": case "FAS": case "FAY"
source share