private string SanitizeDescription(string desc) { string result; if (Provider.GetActivePlugin() != null && Provider.GetActivePlugin().name != "Perforce") { result = desc; } else { int num = desc.IndexOf('\''); if (num == -1) { result = desc; } else { num++; int num2 = desc.IndexOf('\'', num); if (num2 == -1) { result = desc; } else { result = desc.Substring(num, num2 - num).Trim(new char[] { ' ', '\t' }); } } } return(result); }
private string SanitizeDescription(string desc) { if (Provider.GetActivePlugin() != null && Provider.GetActivePlugin().name != "Perforce") { return(desc); } int num1 = desc.IndexOf('\''); if (num1 == -1) { return(desc); } int startIndex = num1 + 1; int num2 = desc.IndexOf('\'', startIndex); if (num2 == -1) { return(desc); } return(desc.Substring(startIndex, num2 - startIndex).Trim(' ', '\t')); }
private string SanitizeDescription(string desc) { if ((Provider.GetActivePlugin() != null) && (Provider.GetActivePlugin().name != "Perforce")) { return(desc); } int index = desc.IndexOf('\''); if (index == -1) { return(desc); } index++; int num2 = desc.IndexOf('\'', index); if (num2 == -1) { return(desc); } char[] trimChars = new char[] { ' ', '\t' }; return(desc.Substring(index, num2 - index).Trim(trimChars)); }
private string SanitizeDescription(string desc) { if (Provider.GetActivePlugin() != null && Provider.GetActivePlugin().name != "Perforce") { return(desc); } // The format of the desc is "327: on 2013/02/03 by foo@bar *pending* 'The real description'" // Extract the part after *pending* int idx = desc.IndexOf('*'); if (idx == -1) { return(desc); } idx++; int idx2 = desc.IndexOf('*', idx); if (idx2 == -1) { return(desc); } return(desc.Substring(idx2 + 1, desc.Length - idx2 - 1).TrimStart(' ').Trim(' ', '\t')); }
private string SanitizeDescription(string desc) { if (Provider.GetActivePlugin() != null && Provider.GetActivePlugin().name != "Perforce") { return(desc); } // The format of the desc is "on 2013/02/03 by foo@bar *pending* 'The real description'" // Extract the part between ' and ' int idx = desc.IndexOf('\''); if (idx == -1) { return(desc); } idx++; int idx2 = desc.IndexOf('\'', idx); if (idx2 == -1) { return(desc); } return(desc.Substring(idx, idx2 - idx).Trim(' ', '\t')); }