示例#1
0
 /// <summary>
 /// 绝对路径格式化
 /// </summary>
 /// <param name="InputStr">输入的字符串</param>
 /// <returns>格式化后的Path</returns>
 public static string AbsolutePathFormat(string InputStr)
 {
     if (VerifyManager.IsAbsolutePath(InputStr))
     {
         return(PathFormat(InputStr));
     }
     return(string.Empty);
 }
示例#2
0
 /// <summary>
 /// 路径格式化
 /// </summary>
 /// <param name="InputStr">输入的字符串</param>
 /// <returns>格式化后的Path</returns>
 public static string PathFormat(string InputStr)
 {
     if (VerifyManager.IsAbsolutePath(InputStr) || VerifyManager.IsRelativePath(InputStr))
     {
         ReplaceStringModel rsm = new ReplaceStringModel(@"/", @"\");
         InputStr = Replace(InputStr, rsm);
         return(RemvoePathLastChar(InputStr));
     }
     return(string.Empty);
 }