Exemple #1
0
 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);
     }
 }
Exemple #2
0
        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);
        }