public static string ProcessMessage(string message, ICollection <string> keys) { string closestMatch = ""; closestMatch = LevenshteinDistance.FolderAwareEditDistance(message, keys.ToArray()); if (closestMatch != null && closestMatch != "") { return(Language.GetTextValue("tModLoader.LoadErrorResourceNotFoundPathHint", message, closestMatch) + "\n"); } return(message); }
public static string ProcessMessage(string message, ICollection <string> keys) { string closestMatch = ""; closestMatch = LevenshteinDistance.FolderAwareEditDistance(message, keys.ToArray()); if (closestMatch != null && closestMatch != "") { return($"Expected resource not found:\n {message}\nClosest guess: (Is there a spelling or folder placement error?)\n {closestMatch}\n"); } return(message); }