示例#1
0
        public void Test_Trim()
        {
            string str;

            str = GEDCOMUtils.Trim("    test1");
            Assert.AreEqual("test1", str);

            str = GEDCOMUtils.Trim("test2        ");
            Assert.AreEqual("test2", str);

            str = GEDCOMUtils.Trim("   test3        ");
            Assert.AreEqual("test3", str);

            str = GEDCOMUtils.Trim(null);
            Assert.AreEqual("", str);
        }
示例#2
0
 public void SetNameParts(string firstPart, string surname, string lastPart)
 {
     fFirstPart = GEDCOMUtils.Trim(firstPart);
     fSurname   = GEDCOMUtils.Trim(surname);
     fLastPart  = GEDCOMUtils.Trim(lastPart);
 }