Esempio n. 1
0
 public static object Substring(object x, object y)
 {
     if (IsType.String(x) && IsType.AnyInt(y))
     {
         return(Strings.Substring((string)x, Integers.ToInteger(y)));
     }
     return(null);
 }
Esempio n. 2
0
        public static object Substring(object x, object y, object z)
        {
            if (!IsType.String(x) || !AreTypes.AnyInt(y, z))
            {
                return(null);
            }
            var r = Strings.Substring((string)x, Integers.ToInteger(y), Integers.ToInteger(z));

            return(r);
        }
Esempio n. 3
0
 public static object AddYears(object x, object y)
 {
     if (!IsType.AnyInt(y))
     {
         return(null);
     }
     if (IsType.DateTime(x))
     {
         return(((DateTime)x).AddYearsSafe(Integers.ToInteger(y)));
     }
     return(null);
 }