Easy.COMMON/DisposeString.cs

(开头部分) 4KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Text.RegularExpressions;
namespace Easy.COMMON
{
    public class DisposeString
    {
        // Methods
        public static string CheckInput(string str)
        {
            if (str == null)
            {
                str = "";
            }
            return str.Replace("'", "''");
        }

        public static int Cint(string str)
        {
            if ((str == null) || (str == ""))
            {
                return 0;
            }
            string sChar = "";
            string sNum = "0123456789";
            for (int i = 0; i < str.Length; i++)
            {
                sChar = str.Substring(i, 1);
                if (sNum.IndexOf(sChar) == -1)
                {
                    return 0;
                }
            }
            return Convert.ToInt32(str);
        }

        public static long GetFileSize(string _PathFile)
        {
            long sumSize = 0L;
            FileInfo fiInfo = new FileInfo(_PathFile);
            sumSize = fiInfo.Length;
            if (sumSize != 0L)
            {
                sumSize /= 0x400L;
            }
            return sumSize;
        }

        public static string GetShotString(string title, int len)
        {
            int titleLength = len;
            if (title.Trim().Length > titleLength)
            {
                title = title.Substring(0, titleLength - 1) + "...";
            }
            return title;
        }
后面还有 83 行代码,购买后查看完整代码

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

AI 解读 AI

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

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