Example #1
0
        /// <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;
            }
        }
Example #2
0
        /// <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);
        }
Example #3
0
 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));
 }
Example #4
0
 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));
 }
Example #5
0
 public void Write(subString value)
 {
     Write(ref value);
 }
Example #6
0
 public bool Equals(subString other)
 {
     return(value.Equals(other));
 }
Example #7
0
 /// <summary>
 /// 字符串Hash
 /// </summary>
 /// <param name="value"></param>
 public hashString(ref subString value)
 {
     this.value = value;
     hashCode   = value == null ? 0 : (value.GetHashCode() ^ random.Hash);
 }
Example #8
0
 /// <summary>
 /// 字符串Hash
 /// </summary>
 /// <param name="value"></param>
 public hashString(subString value)
     : this(ref value)
 { }