sprintf() public static méthode

public static sprintf ( string Format ) : string
Format string
Résultat string
Exemple #1
0
        public static void printf(string Format, params object[] Parameters)
        {
#if UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5
            UnityEngine.Debug.Log(Tools.sprintf(Format, Parameters));
#else
            Console.Write(Tools.sprintf(Format, Parameters));
#endif
        }
Exemple #2
0
        private bool RunTest(string Format, string Wanted, params object[] Parameters)
        {
            string result = Tools.sprintf(Format, Parameters);

            Console.WriteLine("Format:\t{0,-30}Parameters: {1}\nWanted:\t{2}\nResult:\t{3}",
                              Format, ShowParameters(Parameters), Wanted, result);
            if (Wanted == null || Wanted == result)
            {
                Console.WriteLine();
                return(true);
            }
            else
            {
                Console.WriteLine("*** ERROR ***\n");
                return(false);
            }
        }
Exemple #3
0
 public static void fprintf(TextWriter Destination, string Format, params object[] Parameters)
 {
     Destination.Write(Tools.sprintf(Format, Parameters));
 }
Exemple #4
0
 public static void printf(string Format, params object[] Parameters)
 {
     Console.Write(Tools.sprintf(Format, Parameters));
 }
Exemple #5
0
 public static void printf(string Format, params object[] Parameters)
 {
     Sandbox.Log.Info(Tools.sprintf(Format, Parameters));
 }