Пример #1
0
        private string FindSubChainPart(string line)
        {
            List <string> subGroupNames = CarbonSubChain.GetAllNames();
            string        subGroupName  = UtilStrings.FindPattern(line, subGroupNames, UtilStrings.SearchDirection.Backward);

            return(subGroupName);
        }
Пример #2
0
        public void FindSubGroupTest()
        {
            List <string> subGroups = CarbonSubChain.GetAllNames();
            string        line      = "1-methylpentyl";
            string        subgroup  = UtilStrings.FindPattern(line, subGroups, UtilStrings.SearchDirection.Backward);

            StringAssert.AreEqualIgnoringCase("pentyl", subgroup);
        }
        public static string RemoveMultiplyingAffixName(string line)
        {
            List <string> affixNames = GetAllNames();
            string        affixName  = UtilStrings.FindPattern(line, affixNames, UtilStrings.SearchDirection.Forward);

            if (!String.IsNullOrEmpty(affixName))
            {
                return(UtilStrings.RemoveAtStart(line, affixName));
            }
            else
            {
                return(line);
            }
        }