Struct AiString
Represents an aiString struct.
Inherited Members
Namespace: SharpAssimp.Unmanaged
Assembly: SharpAssimp.dll
Syntax
public struct AiString
Constructors
| Edit this page View SourceAiString(string)
Constructs a new instance of the AiString struct.
Declaration
public AiString(string data)
Parameters
Type | Name | Description |
---|---|---|
string | data | The string data |
Fields
| Edit this page View SourceData
Actual string data.
Declaration
public byte* Data
Field Value
Type | Description |
---|---|
byte* |
Length
Byte length of the UTF-8 string, NOT logical length.
Declaration
public uint Length
Field Value
Type | Description |
---|---|
uint |
Methods
| Edit this page View SourceGetString()
Convienence method for getting the AiString string - if the length is not greater than zero, it returns an empty string rather than garbage.
Declaration
public readonly string GetString()
Returns
Type | Description |
---|---|
string | AiString string data |
GetString(in AiString)
Convienence method for getting the AiString string - if the length is not greater than zero, it returns an empty string rather than garbage. Use this to avoid struct copy if the string was passed by read-only ref.
Declaration
public static string GetString(in AiString aiStr)
Parameters
Type | Name | Description |
---|---|---|
AiString | aiStr | AiString |
Returns
Type | Description |
---|---|
string | AiString string data |
SetString(string)
Convienence method for setting the AiString string (and length).
Declaration
public bool SetString(string data)
Parameters
Type | Name | Description |
---|---|---|
string | data | String data to set |
Returns
Type | Description |
---|---|
bool | True if the operation was successful, false otherwise. |
ToString()
Returns the fully qualified type name of this instance.
Declaration
public override readonly string ToString()
Returns
Type | Description |
---|---|
string | A string containing a fully qualified type name. |