HotelCommon/MISC.CS

(开头部分) 1KB

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

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

namespace HotelCommon
{
    public class MISC
    {
        //判断数字
        public static bool IsNumber(string TextValue)
        {
            try
            {
                int n = Convert.ToInt32(TextValue);
                return true;
            }
            catch
            {
                return false;
            }

        }

        //截取字符串
        public static string getSubString(string str, int i)
        {
            if (str.Length < i)
            {
                return str;
            }
            str = str.Substring(0, i) + "...";
            return str;
        }
        //字符串过滤
        public static string HandleString(string s)
        {
            if (s != null)
            {
                string ss = s.Replace("'", "\"");
                ss = ss.Replace(";", ":");
                ss = ss.Replace("-", "-");
                ss = ss.Replace("/*", "/*");
                return ss;
            }
            else
            {
                return s;
            }
        }
        //字符串过滤(不过滤-)
        public static string HandleString1(string s)
        {
            if (s != null)
            {
                string ss = s.Replace("'", "\"");
                ss = ss.Replace(";", ":");
                ss = ss.Replace("--", "--");
                ss = ss.Replace("/*", "/*");
                return ss;
后面还有 8 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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