using System;
using System.Collections.Generic;
using System.Text;

namespace Siger.Middlelayer.Redis.Utility
{
    public class ProcessProgramHelper
    {
        public static string ReplaceProgram(string soure)
        {
            if (!string.IsNullOrEmpty(soure))
            {
                if (soure.Length > 1)
                {
                    if (soure.Substring(0, 1) == ProgramType.mainProgram || soure.Substring(0, 1) == ProgramType.subProgram)
                    {
                        soure = soure.Substring(1, soure.Length - 1);
                    }
                }
            }
            return soure;
        }
    }
    public class ProgramType
    {
        public const string mainProgram = "P";
        public const string subProgram = "S";
    }
}
