Click or drag to resize

Utf8String Class

A mutable string stored and serialized in utf-8 format.
Inheritance Hierarchy
SystemObject
  Ookii.Jumbo.IOUtf8String

Namespace:  Ookii.Jumbo.IO
Assembly:  Ookii.Jumbo (in Ookii.Jumbo.dll) Version: 2.0.0
Syntax
public sealed class Utf8String : IWritable, 
	IEquatable<Utf8String>, IComparable<Utf8String>, IComparable, 
	ICloneable

The Utf8String type exposes the following members.

Constructors
  NameDescription
Public methodUtf8String
Initializes a new instance of the Utf8String class.
Public methodUtf8String(Byte)
Initializes a new instance of the Utf8String class using the specified utf-8 byte array.
Public methodUtf8String(String)
Initializes a new instance of the Utf8String class using the specified string.
Public methodUtf8String(Utf8String)
Initializes a new instance of the Utf8String class that is a copy of the specified Utf8String.
Public methodUtf8String(Byte, Int32, Int32)
Initializes a new instance of the Utf8String class using the specified utf-8 byte array, index and count.
Top
Properties
  NameDescription
Public propertyByteLength
Gets the number of bytes in the encoded string.
Public propertyCapacity
Gets or sets the maximum size, in bytes, of the string this instance can hold without resizing.
Public propertyCharLength
Gets the length of the string in characters.
Top
Methods
  NameDescription
Public methodAppend(Utf8String)
Appends the specified Utf8String to this instance..
Public methodAppend(Byte, Int32, Int32)
Appends a byte array containing utf-8 encoded data to this string.
Public methodClone
Creates a clone of the current Utf8String.
Public methodCompareTo(Object)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Public methodCompareTo(Utf8String)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Public methodEquals(Object)
Tests this Utf8String for equality with the specified object.
(Overrides ObjectEquals(Object).)
Public methodEquals(Utf8String)
Tests this Utf8String for equality with the specified Utf8String.
Public methodGetBytes
Gets the bytes of the utf-8 encoded string.
Public methodGetHashCode
Gets a hash code for this Utf8String.
(Overrides ObjectGetHashCode.)
Public methodStatic memberGetLength
Gets the length of a Utf8String stored in a byte array.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodRead
Reads the object from the specified reader.
Public methodSet(Byte)
Sets the value of this Utf8String to the specified byte array.
Public methodSet(String)
Sets the value of this Utf8String to the specified String.
Public methodSet(Utf8String)
Sets the value of this Utf8String to the value of the specified Utf8String.
Public methodSet(Byte, Int32, Int32)
Sets the value of this Utf8String to the specified region of the specified byte array.
Public methodToString
Gets a string representation of the current Utf8String.
(Overrides ObjectToString.)
Public methodWrite(BinaryWriter)
Writes the object to the specified writer.
Public methodWrite(Stream)
Writes this Utf8String to the specified stream.
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Determines whether two specified Utf8String objects have the same value.
Public operatorStatic memberGreaterThan
Determines whether one specified Utf8String is greater than another specified Utf8String
Public operatorStatic memberGreaterThanOrEqual
Determines whether one specified Utf8String is greater than or equal to another specified Utf8String
Public operatorStatic memberInequality
Determines whether two specified Utf8String objects have different values.
Public operatorStatic memberLessThan
Determines whether one specified Utf8String is less than another specified Utf8String
Public operatorStatic memberLessThanOrEqual
Determines whether one specified Utf8String is less than or equal to another specified Utf8String
Top
Remarks
Note Note
Instances of the Utf8String class will not compare in proper lexicographical order if the string contains multi-byte characters. All that is guaranteed is that the ordering is deterministic.

Because this object is mutable you must take care when using it scenarios where immutability is expected, e.g. as a key in a DictionaryTKey, TValue.

See Also