Example #1
0
 public bool Equals(NativeString4096 other)
 {
     unsafe
     {
         fixed(char *c = buffer)
         return(NativeString.Equals(c, Length, other.buffer, other.Length));
     }
 }
Example #2
0
 public int CompareTo(NativeString4096 other)
 {
     unsafe
     {
         fixed(char *b = buffer)
         return(NativeString.CompareTo(b, Length, other.buffer, other.Length));
     }
 }
Example #3
0
        public bool Equals(NativeString64 other)
        {
            unsafe
            {
                fixed(uint *b = buffer)
                {
                    var c = (char *)b;

                    return(NativeString.Equals(c, Length, (char *)other.buffer, other.Length));
                }
            }
        }
Example #4
0
        public int CompareTo(NativeString64 other)
        {
            unsafe
            {
                fixed(uint *b = buffer)
                {
                    var c = (char *)b;

                    return(NativeString.CompareTo(c, Length, (char *)other.buffer, other.Length));
                }
            }
        }
Example #5
0
        public ParseError Parse(ref int offset, ref float output, char decimalSeparator = '.')
        {
            unsafe
            {
                fixed(uint *b = buffer)
                {
                    var          c    = (char *)b;
                    NativeString temp = new NativeString {
                        buffer = c, Length = Length, Capacity = MaxLength
                    };

                    return(temp.Parse(ref offset, ref output, decimalSeparator));
                }
            }
        }
Example #6
0
        public FormatError Format(float input, char decimalSeparator = '.')
        {
            unsafe
            {
                fixed(uint *b = buffer)
                {
                    var          c    = (char *)b;
                    NativeString temp = new NativeString {
                        buffer = c, Length = Length, Capacity = MaxLength
                    };
                    var error = temp.Format(input, decimalSeparator);

                    Length = temp.Length;
                    return(error);
                }
            }
        }