• string类的实现


    string类的常用相关接口

    • 构造函数,析构函数
    • 运算符的重载
    • c_str函数、reserve函数、resize函数
    • push_back函数、append函数
    • 迭代器的实现

    string类成员变量的定义

    class string
    {
     private:
     char*_str;
     size_t size;//string类的大小
     size_t capacity;//string类存储容量
     public:
     const static size_t npos=-1;
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9

    string类构造函数的实现

    1.构造函数的实现
    使用**“”**空字符串作为缺省参数,常量字符串末尾有‘\0’,当不传参时,_str只存着一个‘\0’

    string(const char* str="")
    		{
    			_size = strlen(str);
    			_capacity = _size;
    			_str = new char[_capacity+ 1];//多开一位用来存放'\0'
    			memcpy(_str, str, _size + 1);
    		}
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    1. 拷贝构造函数的实现
      这里的tmp变量属于局部变量,当拷贝构造函数调用完以后栈帧会销毁,tmp变量也会跟着销毁了。
    //方法一:
    		void swap(string& s)
    		{
    			::swap(_str, s._str);
    			::swap(_size, s._size);
    			::swap(_capacity, s._capacity);
    		}
    		string(const string& s)
    			:_str(nullptr)
    			,_size(0)
    			,_capacity(0)//使用初始化列表初始化
    		{
    			string tmp(s._str);
    			swap(tmp);	//this->swap(tmp); 
    		}
    		//方法二:
    		string(const string& s)
    			:_str(new char[s._capacity + 1])
    			, _size(s._size)
    			, _capacity(s._capacity)
    		{
    				memcpy(_str, s._str, _size + 1);
    		}
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23

    注意:同一个类域中,类的成员变量可以相互访问

    string类析构函数的实现

    ~string()
    		{
    			if (_str)
    			{
    				delete [] _str;
    				_str = nullptr;
    				_size = _capacity = 0;
    			}
    		}
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9

    string类c_str函数实现

    返回字符串指针(该字符串的首地址)

    const char* c_str(const string& s)
    		{
    			return s._str;
    		}
    
    • 1
    • 2
    • 3
    • 4

    string类size函数的实现

    _size为私有成员变量,在类域外需要通过函数才能调用进行间接访问

    size_t size()const
    {
    return _size;
    }
    
    • 1
    • 2
    • 3
    • 4

    string类capacity函数的实现

    size_t capacity()const
    {
    return _capacity;
    }
    
    • 1
    • 2
    • 3
    • 4

    string类reserve函数的实现

    功能:扩容

    void reserve(size_t n)
    	{
    		if (n > _capacity)
    		{
    			char* tmp = new char[n + 1];
    			//strcpy(tmp, _str);
    			memcpy(tmp, _str, _size+1);
    
    			delete[] _str;
    			_str = tmp;
    			_capacity = n;
    		}
    	}
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13

    string类resize函数的实现

    功能:有缩容的作用和初始化的作用,还有扩容的作用
    当传的值比实际的容量小时,会进行缩容,当传的值比实际的值大时,会进行扩容并初始化

    void resize(size_t n, char ch = '\0')
    	{
    		if (n < _size)
    		{
    			_size = n;
    			_str[_size] = '\0';
    		}
    		else
    		{
    			reserve(n);
    			for (size_t i = _size; i < n; i++)
    			{
    				_str[i] = ch;
    			}
    
    			_size = n;
    			_str[_size] = '\0';
    		}
    	}
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19

    string类push_back的实现

    一次尾插入一个字符

    void push_back(char ch)
    		{
    			if (_size == _capacity)
    			{
    				// 2倍扩容
    				reserve(_capacity == 0 ? 4 : _capacity * 2);
    			}
    
    			_str[_size] = ch;
    
    			++_size;
    			_str[_size] = '\0';
    		}
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13

    string类append函数的实现

    一次尾插入一个字符串

    void append(const char* str)
    		{
    			size_t len = strlen(str);
    			if (_size + len > _capacity)
    			{
    				// 至少扩容到_size + len
    				reserve(_size+len);
    			}
    
    			//strcpy(_str + _size, str);
    			memcpy(_str + _size, str, len+1);
    
    			_size += len;
    		}
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14

    string类运算符的重载

    1、比较运算符重载

    运算符重载之间可以进行运算符的复用

    bool operator<(const string& s) const
    		{
    			int ret = memcmp(_str, s._str, _size < s._size ? _size : s._size);
    			return ret == 0 ? _size < s._size : ret < 0;
    		}
    
    		bool operator==(const string& s) const
    		{
    			return _size == s._size 
    				&& memcmp(_str, s._str, _size) == 0;
    		}
    
    		bool operator<=(const string& s) const
    		{
    			return *this < s || *this == s;//运算符复用
    		}
    
    		bool operator>(const string& s) const
    		{
    			return !(*this <= s);
    		}
    
    		bool operator>=(const string& s) const
    		{
    			return !(*this < s);
    		}
    
    		bool operator!=(const string& s) const
    		{
    			return !(*this == s);
    		}
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31

    2、复制运算符的重载

    swap函数前面有

    //方法一:
    string& operator=(const string& s)
    		{
    			if (this != &s)
    			{
    				char* tmp = new char[s._capacity + 1];
    				memcpy(tmp, s._str, s._size+1);
    				delete[] _str;
    				_str = tmp;
    
    				_size = s._size;
    				_capacity = s._capacity;
    			}
    
    			return *this;
    		}
    //方法二:
    string& operator=(string tmp)
    		{
    			swap(tmp);
    
    			return *this;
    		}
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23

    3、【】运算符的重载

    char& operator[](size_t pos)
    	{
    		assert(pos < _size);
    
    		return _str[pos];
    	}
    
    const char& operator[](size_t pos) const 
    		{
    			assert(pos < _size);
    
    			return _str[pos];
    		}
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13

    clear函数的重载

    void clear()
    		{
    			_str[0] = '\0';
    			_size = 0;
    		}
    
    • 1
    • 2
    • 3
    • 4
    • 5

    4、输入输出运算符的重载

    1.输出运算符重载
    范围for实现迭代器以后方可使用

    ostream& operator<<(ostream& out, const string& s)
    	{
    		/*for (size_t i = 0; i < s.size(); i++)
    		{
    			out << s[i];
    		}*/
    
    		for (auto ch : s)
    		{
    			out << ch;
    		}
    
    		return out;
    	}
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14

    2.输入运算符重载
    创建一个buff数组,用来存储输入的字符,这样可以有效的节省空间

    istream& operator>>(istream& in, string& s)
    	{
    		s.clear();
    
    		char ch = in.get();
    		// 处理前缓冲区前面的空格或者换行
    		while (ch == ' ' || ch == '\n')
    		{
    			ch = in.get();
    		}
    
    		//in >> ch;
    		char buff[128];
    		int i = 0;
    
    		while (ch != ' ' && ch != '\n')
    		{
    			buff[i++] = ch;
    			if (i == 127)
    			{
    				buff[i] = '\0';
    				s += buff;
    				i = 0;
    			}
    
    			//in >> ch;
    			ch = in.get();
    		}
    
    		if (i != 0)
    		{
    			buff[i] = '\0';
    			s += buff;
    		}
    
    		return in;
    	}
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37

    insert函数的实现

    void insert(size_t pos, const char* str)
    		{
    			assert(pos <= _size);
    
    			size_t len = strlen(str);
    			if (_size + len > _capacity)
    			{
    				// 至少扩容到_size + len
    				reserve(_size + len);
    			}
                //挪动数据
    			size_t end = _size;
    			while (end >= pos && end != npos)
    			{
    				_str[end + len] = _str[end];
    				--end;
    			}
              //插入数据
    			for (size_t i = 0; i < len; i++)
    			{
    				_str[pos + i] = str[i];
    			}
    
    			_size += len;
    		}
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25

    erase函数的实现

    void erase(size_t pos, size_t len = npos)
    		{
    			assert(pos <= _size);
    
    			if (len == npos || pos + len >= _size)
    			{
    				//_str[pos] = '\0';
    				_size = pos;
    
    				_str[_size] = '\0';
    			}
    			else
    			{
    				size_t end = pos + len;
    				while (end <= _size)
    				{
    					_str[pos++] = _str[end++];
    				}
    				_size -= len;
    			}
    		}
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21

    find函数的实现

    找到返回下标,找不到返回npos

    size_t find(char ch, size_t pos = 0)
    		{
    			assert(pos < _size);
    
    			for (size_t i = pos; i < _size; i++)
    			{
    				if (_str[i] == ch)
    				{
    					return i;
    				}
    			}
    
    			return npos;
    		}
    
    		size_t find(const char* str , size_t pos = 0)
    		{
    			assert(pos < _size);
    
    			const char* ptr = strstr(_str + pos, str);
    			if (ptr)
    			{
    				return ptr - _str;
    			}
    			else
    			{
    				return npos;
    			}
    		}
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29

    substr函数的实现

    string substr(size_t pos = 0, size_t len = npos)
    		{
    			assert(pos < _size);
    
    			size_t n = len;
    			if (len == npos || pos + len > _size)
    			{
    				n = _size - pos;
    			}
    
    			string tmp;
    			tmp.reserve(n);
    			for (size_t i = pos; i < pos + n; i++)
    			{
    				tmp += _str[i];
    			}
    
    			return tmp;
    		}
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19

    迭代器的实现

    这里的迭代器类型就是c语言中的char*指针类型

    public:
    		typedef char* iterator;
    		typedef const char* const_iterator;
    
    		iterator begin()
    		{
    			return _str;
    		}
    
    		iterator end()
    		{
    			return _str + _size;
    		}
    
    		const_iterator begin() const
    		{
    			return _str;
    		}
    
    		const_iterator end() const
    		{
    			return _str + _size;
    		}
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23

    string类模拟实现的全部代码

    #pragma once
    
    #include
    
    namespace lx
    {
    	class string
    	{
    	public:
    		typedef char* iterator;
    		typedef const char* const_iterator;
    
    		iterator begin()
    		{
    			return _str;
    		}
    
    		iterator end()
    		{
    			return _str + _size;
    		}
    
    		const_iterator begin() const
    		{
    			return _str;
    		}
    
    		const_iterator end() const
    		{
    			return _str + _size;
    		}
    
    		string(const char* str = "")
    		{
    			_size = strlen(str);
    			_capacity = _size;
    			_str = new char[_capacity + 1];
    			//strcpy(_str, str);
    			memcpy(_str, str, _size+1);
    		}
    
    		string(const string& s)
    		{
    			_str = new char[s._capacity + 1];
    			//strcpy(_str, s._str);
    			memcpy(_str, s._str, s._size + 1);
    			_size = s._size;
    			_capacity = s._capacity;
    		}
    
    		// s1 = s3
    		/*string& operator=(const string& s)
    		{
    			if (this != &s)
    			{
    				char* tmp = new char[s._capacity + 1];
    				memcpy(tmp, s._str, s._size+1);
    				delete[] _str;
    				_str = tmp;
    
    				_size = s._size;
    				_capacity = s._capacity;
    			}
    
    			return *this;
    		}*/
    
    		void swap(string& s)
    		{
    			std::swap(_str, s._str);
    			std::swap(_size, s._size);
    			std::swap(_capacity, s._capacity);
    		}
    
    		//string& operator=(const string& s)
    		//{
    		//	if (this != &s)
    		//	{
    		//		string tmp(s);
    
    		//		//this->swap(tmp);
    		//		swap(tmp);
    		//	}
    
    		//	return *this;
    		//}
    
    		string& operator=(string tmp)
    		{
    			swap(tmp);
    
    			return *this;
    		}
    
    		~string()
    		{
    			delete[] _str;
    			_str = nullptr;
    			_size = _capacity = 0;
    		}
    
    		const char* c_str() const
    		{
    			return _str;
    		}
    
    		size_t size() const
    		{
    			return _size;
    		}
    
    		char& operator[](size_t pos)
    		{
    			assert(pos < _size);
    
    			return _str[pos];
    		}
    
    		const char& operator[](size_t pos) const 
    		{
    			assert(pos < _size);
    
    			return _str[pos];
    		}
    
    		void reserve(size_t n)
    		{
    			if (n > _capacity)
    			{
    
    				char* tmp = new char[n + 1];
    				//strcpy(tmp, _str);
    				memcpy(tmp, _str, _size+1);
    
    				delete[] _str;
    				_str = tmp;
    				_capacity = n;
    			}
    		}
    
    		void resize(size_t n, char ch = '\0')
    		{
    			if (n < _size)
    			{
    				_size = n;
    				_str[_size] = '\0';
    			}
    			else
    			{
    				reserve(n);
    
    				for (size_t i = _size; i < n; i++)
    				{
    					_str[i] = ch;
    				}
    
    				_size = n;
    				_str[_size] = '\0';
    			}
    		}
    
    		void push_back(char ch)
    		{
    			if (_size == _capacity)
    			{
    				// 2倍扩容
    				reserve(_capacity == 0 ? 4 : _capacity * 2);
    			}
    
    			_str[_size] = ch;
    
    			++_size;
    			_str[_size] = '\0';
    		}
    
    		void append(const char* str)
    		{
    			size_t len = strlen(str);
    			if (_size + len > _capacity)
    			{
    				// 至少扩容到_size + len
    				reserve(_size+len);
    			}
    
    			//strcpy(_str + _size, str);
    			memcpy(_str + _size, str, len+1);
    
    			_size += len;
    		}
    
    		string& operator+=(char ch)
    		{
    			push_back(ch);
    			return *this;
    		}
    
    		string& operator+=(const char* str)
    		{
    			append(str);
    			return *this;
    		}
    
    		void insert(size_t pos, size_t n, char ch)
    		{
    			assert(pos <= _size);
    
    			if (_size +n > _capacity)
    			{
    				// 至少扩容到_size + len
    				reserve(_size + n);
    			}
    			// 挪动数据
    			size_t end = _size;
    			while (end >= pos && end != npos)
    			{
    				_str[end + n] = _str[end];
    				--end;
    			}
                //插入数据
    			for (size_t i = 0; i < n; i++)
    			{
    				_str[pos + i] = ch;
    			}
    
    			_size += n;
    		}
    
    		void insert(size_t pos, const char* str)
    		{
    			assert(pos <= _size);
    
    			size_t len = strlen(str);
    			if (_size + len > _capacity)
    			{
    				// 至少扩容到_size + len
    				reserve(_size + len);
    			}
    
    			// 挪动数据
    			size_t end = _size;
    			while (end >= pos && end != npos)
    			{
    				_str[end + len] = _str[end];
    				--end;
    			}
                //插入数据
    			for (size_t i = 0; i < len; i++)
    			{
    				_str[pos + i] = str[i];
    			}
    
    			_size += len;
    		}
    
    		void erase(size_t pos, size_t len = npos)
    		{
    			assert(pos <= _size);
    
    			if (len == npos || pos + len >= _size)
    			{
    				//_str[pos] = '\0';
    				_size = pos;
    
    				_str[_size] = '\0';
    			}
    			else
    			{
    				size_t end = pos + len;
    				while (end <= _size)
    				{
    					_str[pos++] = _str[end++];
    				}
    				_size -= len;
    			}
    		}
    
    		size_t find(char ch, size_t pos = 0)
    		{
    			assert(pos < _size);
    
    			for (size_t i = pos; i < _size; i++)
    			{
    				if (_str[i] == ch)
    				{
    					return i;
    				}
    			}
    
    			return npos;
    		}
    
    		size_t find(const char* str , size_t pos = 0)
    		{
    			assert(pos < _size);
    
    			const char* ptr = strstr(_str + pos, str);
    			if (ptr)
    			{
    				return ptr - _str;
    			}
    			else
    			{
    				return npos;
    			}
    		}
    
    		string substr(size_t pos = 0, size_t len = npos)
    		{
    			assert(pos < _size);
    
    			size_t n = len;
    			if (len == npos || pos + len > _size)
    			{
    				n = _size - pos;
    			}
    
    			string tmp;
    			tmp.reserve(n);
    			for (size_t i = pos; i < pos + n; i++)
    			{
    				tmp += _str[i];
    			}
    
    			return tmp;
    		}
    
    		void clear()
    		{
    			_str[0] = '\0';
    			_size = 0;
    		}
    
    		bool operator<(const string& s) const
    		{
    			int ret = memcmp(_str, s._str, _size < s._size ? _size : s._size);
    			return ret == 0 ? _size < s._size : ret < 0;
    		}
    
    		bool operator==(const string& s) const
    		{
    			return _size == s._size 
    				&& memcmp(_str, s._str, _size) == 0;
    		}
    
    		bool operator<=(const string& s) const
    		{
    			return *this < s || *this == s;
    		}
    
    		bool operator>(const string& s) const
    		{
    			return !(*this <= s);
    		}
    
    		bool operator>=(const string& s) const
    		{
    			return !(*this < s);
    		}
    
    		bool operator!=(const string& s) const
    		{
    			return !(*this == s);
    		}
    
    	private:
    		size_t _size;
    		size_t _capacity;
    		char* _str;
    	
    	public:
    		//const static size_t npos = -1; // 虽然可以这样用,但是不建议
    		const static size_t npos;
    	};
    	const size_t string::npos = -1;
    
    
    	ostream& operator<<(ostream& out, const string& s)
    	{
    		/*for (size_t i = 0; i < s.size(); i++)
    		{
    			out << s[i];
    		}*/
    
    		for (auto ch : s)
    		{
    			out << ch;
    		}
    
    		return out;
    	}
    	
    	istream& operator>>(istream& in, string& s)
    	{
    		s.clear();
    
    		char ch = in.get();
    		// 处理前缓冲区前面的空格或者换行
    		while (ch == ' ' || ch == '\n')
    		{
    			ch = in.get();
    		}
    
    		//in >> ch;
    		char buff[128];
    		int i = 0;
    
    		while (ch != ' ' && ch != '\n')
    		{
    			buff[i++] = ch;
    			if (i == 127)
    			{
    				buff[i] = '\0';
    				s += buff;
    				i = 0;
    			}
    
    			//in >> ch;
    			ch = in.get();
    		}
    
    		if (i != 0)
    		{
    			buff[i] = '\0';
    			s += buff;
    		}
    
    		return in;
    	}
    };
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178
    • 179
    • 180
    • 181
    • 182
    • 183
    • 184
    • 185
    • 186
    • 187
    • 188
    • 189
    • 190
    • 191
    • 192
    • 193
    • 194
    • 195
    • 196
    • 197
    • 198
    • 199
    • 200
    • 201
    • 202
    • 203
    • 204
    • 205
    • 206
    • 207
    • 208
    • 209
    • 210
    • 211
    • 212
    • 213
    • 214
    • 215
    • 216
    • 217
    • 218
    • 219
    • 220
    • 221
    • 222
    • 223
    • 224
    • 225
    • 226
    • 227
    • 228
    • 229
    • 230
    • 231
    • 232
    • 233
    • 234
    • 235
    • 236
    • 237
    • 238
    • 239
    • 240
    • 241
    • 242
    • 243
    • 244
    • 245
    • 246
    • 247
    • 248
    • 249
    • 250
    • 251
    • 252
    • 253
    • 254
    • 255
    • 256
    • 257
    • 258
    • 259
    • 260
    • 261
    • 262
    • 263
    • 264
    • 265
    • 266
    • 267
    • 268
    • 269
    • 270
    • 271
    • 272
    • 273
    • 274
    • 275
    • 276
    • 277
    • 278
    • 279
    • 280
    • 281
    • 282
    • 283
    • 284
    • 285
    • 286
    • 287
    • 288
    • 289
    • 290
    • 291
    • 292
    • 293
    • 294
    • 295
    • 296
    • 297
    • 298
    • 299
    • 300
    • 301
    • 302
    • 303
    • 304
    • 305
    • 306
    • 307
    • 308
    • 309
    • 310
    • 311
    • 312
    • 313
    • 314
    • 315
    • 316
    • 317
    • 318
    • 319
    • 320
    • 321
    • 322
    • 323
    • 324
    • 325
    • 326
    • 327
    • 328
    • 329
    • 330
    • 331
    • 332
    • 333
    • 334
    • 335
    • 336
    • 337
    • 338
    • 339
    • 340
    • 341
    • 342
    • 343
    • 344
    • 345
    • 346
    • 347
    • 348
    • 349
    • 350
    • 351
    • 352
    • 353
    • 354
    • 355
    • 356
    • 357
    • 358
    • 359
    • 360
    • 361
    • 362
    • 363
    • 364
    • 365
    • 366
    • 367
    • 368
    • 369
    • 370
    • 371
    • 372
    • 373
    • 374
    • 375
    • 376
    • 377
    • 378
    • 379
    • 380
    • 381
    • 382
    • 383
    • 384
    • 385
    • 386
    • 387
    • 388
    • 389
    • 390
    • 391
    • 392
    • 393
    • 394
    • 395
    • 396
    • 397
    • 398
    • 399
    • 400
    • 401
    • 402
    • 403
    • 404
    • 405
    • 406
    • 407
    • 408
    • 409
    • 410
    • 411
    • 412
    • 413
    • 414
    • 415
    • 416
    • 417
    • 418
    • 419
    • 420
    • 421
    • 422
    • 423
    • 424
    • 425
    • 426
    • 427
    • 428
    • 429
  • 相关阅读:
    服务器防止SSH暴力破解
    .net6项目模板搭建教程
    JSON.toJSONString/JSONObject.toJSONString将实体类对象转换成JSON字符串时,多出了params字符串[记录贴]
    无线终端掉线问题专题
    Q41F-40C手动球阀型号解析
    【组件封装】基于neo4jD3封装关系图、关联图谱
    2023-10-24 小总结
    【wpf】Bingding的方向和触发的时机
    java注解和通过反射获取注解值
    238. 除自身以外数组的乘积 (前缀和)
  • 原文地址:https://blog.csdn.net/m0_72532428/article/details/133490027