public bool IsStarNameRelated(string starname) { if (BodyName.Length >= starname.Length) { string s = BodyName.Substring(0, starname.Length); return(starname.Equals(s, StringComparison.InvariantCultureIgnoreCase)); } else { return(false); } }
public string IsStarNameRelatedReturnRest(string starname) // null if not related, else rest of string { if (BodyName.Length >= starname.Length) { string s = BodyName.Substring(0, starname.Length); if (starname.Equals(s, StringComparison.InvariantCultureIgnoreCase)) { return(BodyName.Substring(starname.Length).Trim()); } } return(null); }