private string toPattern(string s, string p, string o, bool toObject) { if (toObject) { return s + ' ' + p + ' ' + o + " . \n"; } else { return o + ' ' + p + ' ' + s + " . \n"; } }