public static FCgStringSentence CreateOneWordSentence(string word, ECgStringWordRule rule = ECgStringWordRule.MatchCase) { FCgStringSentence sentence = new FCgStringSentence(); FCgStringPhrase phrase = new FCgStringPhrase(); phrase.AddAndToWord(0, word, rule); sentence.AddPhrase(phrase); return(sentence); }
public void AddOrToWord(int index, string word, ECgStringWordRule rule = ECgStringWordRule.MatchCase) { int count = Words.Count; if (index >= count) { for (int i = 0; i < index - count + 1; ++i) { Words.Add(new FCgStringWord()); } } Words[index].AddOr(word, rule); }
public FCgStringWordInfo(string val, ECgStringWordRule rule) { Value = val; Rule = rule; Altered = Rule == ECgStringWordRule.Lower ? Value.ToLower() : Value; EscapeType = ECgStringEscapeType.MAX; if (Value == ESCAPE_INT) { EscapeType = ECgStringEscapeType.Int; } else if (Value == ESCAPE_FLOAT) { EscapeType = ECgStringEscapeType.Float; } }
public void AddOr(string s, ECgStringWordRule rule = ECgStringWordRule.MatchCase) { Ors.Add(new FCgStringWordInfo(s, rule)); }