ClassLibraryWeiBao/ClassWeiWeiXin.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions; //包含正则表达式
namespace ClassLibraryWeiBao
{
public class ClassWeiWeiXin
{
/// <summary>
/// 判断 含 http:// https:// 时 直接返回 不包含的时候 合成本地路径
/// </summary>
/// <param name="path1"></param>
/// <param name="host"></param>
/// <returns></returns>
public static string GetUrlPath(string path1, string host)
{
if (path1.ToLower().IndexOf("http:") >= 0)
return path1;
if (path1.ToLower().IndexOf("https:") >= 0)
return path1;
string npath = "http://" +( host + path1).Replace("//","/");
return npath;
}
/// <summary>
/// 获取 文件名 去掉扩展名
/// </summary>
/// <param name="filepath"></param>
/// <returns></returns>
public static string GetFileName(string filepath)
{
try
{
System.IO.FileInfo FileN = new System.IO.FileInfo(filepath);
string name = FileN.Name.Remove(FileN.Name.LastIndexOf("."));
return name;
}
catch
{
System.IO.FileInfo FileN = new System.IO.FileInfo(filepath);
string name = FileN.Name;
return name;
}
}
/// <summary>
/// 获取 文件名 去掉扩展名
后面还有 59 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。