Exemple #1
0
        public static string Prefix(string prefix, string body)
        {
            Mutation m = Mutation.Len1; if (Opers.EndsDental(prefix))

            {
                m = Mutation.Len2;                                                              //pick the right mutation
            }
            if (prefix.Substring(prefix.Length - 1) == body.Substring(0))
            {
                prefix += "-";                                                                //eg. "sean-nós"
            }
            if (EndsVowel(prefix) && StartsVowel(body))
            {
                prefix += "-";                                                  //eg. "ró-éasca"
            }
            if (body.Substring(0, 1) == body.Substring(0, 1).ToUpper())         //eg. "seanÉireannach" > "Sean-Éireannach"
            {
                prefix = prefix.Substring(0, 1).ToUpper() + prefix.Substring(1);
                if (!prefix.EndsWith("-"))
                {
                    prefix += "-";
                }
            }
            string ret = prefix + Mutate(m, body);

            return(ret);
        }