Struct UnsafeStringView
A view on top of the Packed
Implements
Inherited Members
Namespace: Unity.Serialization.Json.Unsafe
Assembly: Unity.Serialization.dll
Syntax
public readonly struct UnsafeStringView : IEquatable<string>
Properties
this[int]
Gets the char at a specified position in the current Serialized
Declaration
public char this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
int | index | A position in the current string. |
Property Value
Type | Description |
---|---|
char |
Exceptions
Type | Condition |
---|---|
Index |
index is greater than or equal to the length of this object or less than zero. |
Methods
AsSafe()
Declaration
public SerializedStringView AsSafe()
Returns
Type | Description |
---|---|
Serialized |
Equals(string)
Determines whether this view and another specified string object have the same value.
Declaration
public bool Equals(string other)
Parameters
Type | Name | Description |
---|---|---|
string | other | The string to compare to this view. |
Returns
Type | Description |
---|---|
bool | 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 Serialized
Declaration
public int Length()
Returns
Type | Description |
---|---|
int | The number of characters in the string. |
ToString()
Allocates and returns a new string instance based on the view.
Declaration
public override string ToString()