Common/MyString.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Text;
using System.Text.RegularExpressions;
namespace Common
{
    public class MyString
    {
        public static string DeleteBlankLine(string InPut)
        {
            if (InPut != "")
            {
                return (InPut = Regex.Replace(InPut, @"(\n[\s| ]*\r)", "", RegexOptions.Compiled));
            }
            return InPut;
        }
        public static string DeleteBlank(string InPut)
        {
            if (InPut != "")
            {
                InPut = Regex.Replace(InPut, @"\n", "", RegexOptions.Compiled);
                InPut = Regex.Replace(InPut, @"\r", "", RegexOptions.Compiled);
                return InPut;
            }
            return InPut;
        }
        public static string DeleLastChar(string InPut)
        {
            if (InPut != "")
            {
                InPut.Substring(0, InPut.LastIndexOf(","));
            }
            return InPut;
        }
        public static string DeleLastChar(string InPut,string chars)
        {
            if (InPut != "")
            {
                InPut.Substring(0, InPut.LastIndexOf(""+chars+""));
            }
            return InPut;
        }
        public static string Left(object InPut, int Long)
        {
            if (Long >= InPut.ToString().Length)
            {
                return InPut.ToString();
            }
            string str = InPut.ToString().Substring(0, Long - 3) + "...";
            if (str.EndsWith("?..."))
            {
                str = str.Substring(0, str.Length - 4) + "...";
            }
            return str;
        }

        public static string Left(string mText, int byteCount)
        {
            if (byteCount < 1)
            {
                return mText;
后面还有 78 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。