Struct SerializedStringView
A view on top of the PackedBinaryStream that represents a string.
Namespace: Unity.Serialization
Syntax
public struct SerializedStringView : ISerializedView, IEquatable<string>
Properties
Item[Int32]
Gets the System.Char at a specified position in the current SerializedStringView.
Declaration
public char this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | A position in the current string. |
Property Value
Type | Description |
---|---|
System.Char |
Exceptions
Type | Condition |
---|---|
System.IndexOutOfRangeException |
Methods
Equals(String)
Determines whether this view and another specified System.String object have the same value.
Declaration
public bool Equals(string other)
Parameters
Type | Name | Description |
---|---|---|
System.String | other | The string to compare to this view. |
Returns
Type | Description |
---|---|
System.Boolean | true if the value of the value parameter is the same as the value of this view; otherwise, false. |
Length()
Gets the number of characters in the SerializedStringView.
Declaration
public int Length()
Returns
Type | Description |
---|---|
System.Int32 | The number of characters in the string. |
ToString()
Allocates and returns a new string instance based on the view.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A new System.String instance. |