您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

33 行
971 B

using Unity.UIWidgets.foundation;
namespace Unity.UIWidgets.uiOld{
struct TextBuff {
public readonly string text;
public readonly int offset;
public readonly int size;
public TextBuff(string text, int? offset = null, int? size = null) {
this.text = text;
this.offset = offset ?? 0;
this.size = size ?? text.Length - this.offset;
}
public char charAt(int index) {
return text[offset + index];
}
public TextBuff subBuff(int shift, int size) {
D.assert(shift >= 0 && shift <= this.size);
D.assert(shift + size <= this.size);
return new TextBuff(text, offset + shift, size);
}
public override string ToString() {
return text.Substring(offset, size);
}
public string subString(int shift, int size) {
return text.Substring(offset + shift, size);
}
}
}