⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 string.h

📁 MONA是为数不多的C++语言编写的一个很小的操作系统
💻 H
字号:
// This file is in the public domain.
// There are no restrictions on any sort of usage of this file.

#ifndef __SYSTEM_STRING_H__
#define __SYSTEM_STRING_H__

#include <gui/System/Text/Encoding.h>

namespace System
{
	struct String : public _A<wchar>
	{
		String();
		String(const char* text, int length = -1);
		String(_A<wchar> text);
		virtual ~String();
		
		wchar operator [](int index) const { return this->GetValue(index); }
		
		bool operator ==(const String& text);
		inline bool operator !=(const String& text) { return *this != text; }
		String& operator =(const String& text);
		String& operator =(const char* text);
		void operator +=(const String& text);
		void operator +=(wchar ch);
		String operator +(const String& text);
		
		bool StartsWith(const String& value);
		bool EndsWith(const String& value);
		
		String Substring(int start, int length);
	};
}

extern System::String operator +(const char* text1, const System::String& text2);

#endif  // __SYSTEM_STRING_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -