/// <summary> /// 写字符串 /// </summary> /// <param name="value">字符串</param> public unsafe void Write(ref subString value) { if (value.Length != 0) { int length = value.Length << 1; prepLength(length); fixed(char *valueFixed = value.value) fastCSharp.unsafer.memory.Copy(valueFixed + value.StartIndex, data.Byte + this.length, length); this.length += length; } }
/// <summary> /// 大写转小写 /// </summary> /// <param name="value">大写字符串</param> /// <returns>小写字符串(原引用)</returns> public unsafe static subString toLower(this subString value) { if (value.Length != 0) { fixed(char *valueFixed = value.value) { char *start = valueFixed + value.StartIndex; unsafer.String.ToLower(start, start + value.Length); } } return(value); }
public static bool FromXml <valueType>(this valueType value, subString xml, fastCSharp.emit.xmlParser.config config = null) { return(fastCSharp.emit.xmlParser.Parse(ref xml, ref value, config)); }
public static bool FromJson <valueType>(this valueType value, subString json, fastCSharp.emit.jsonParser.config config = null) { return(fastCSharp.emit.jsonParser.Parse(ref json, ref value, config)); }
public void Write(subString value) { Write(ref value); }
public bool Equals(subString other) { return(value.Equals(other)); }
/// <summary> /// 字符串Hash /// </summary> /// <param name="value"></param> public hashString(ref subString value) { this.value = value; hashCode = value == null ? 0 : (value.GetHashCode() ^ random.Hash); }
/// <summary> /// 字符串Hash /// </summary> /// <param name="value"></param> public hashString(subString value) : this(ref value) { }