CodeGenTokenizer.Decode 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| Decode(IEnumerable<Int32>) |
將給定的 id 解碼回字串。 |
| Decode(IEnumerable<Int32>, Boolean, Boolean) |
將給定的 id 解碼回字串。 |
| Decode(IEnumerable<Int32>, Span<Char>, Int32, Int32) |
將給定的 id 解碼回文字,並將結果儲存在該 |
| Decode(IEnumerable<Int32>, Span<Char>, Boolean, Boolean, Int32, Int32) |
將給定的 id 解碼回文字,並將結果儲存在該 |
Decode(IEnumerable<Int32>)
將給定的 id 解碼回字串。
public override string Decode(System.Collections.Generic.IEnumerable<int> ids);
override this.Decode : seq<int> -> string
Public Overrides Function Decode (ids As IEnumerable(Of Integer)) As String
參數
- ids
- IEnumerable<Int32>
我們想要解碼的 id 清單。
傳回
解碼的字串。
適用於
Decode(IEnumerable<Int32>, Boolean, Boolean)
將給定的 id 解碼回字串。
public string Decode(System.Collections.Generic.IEnumerable<int> ids, bool hasPrefixSpace, bool considerSpecialTokens);
override this.Decode : seq<int> * bool * bool -> string
Public Function Decode (ids As IEnumerable(Of Integer), hasPrefixSpace As Boolean, considerSpecialTokens As Boolean) As String
參數
- ids
- IEnumerable<Int32>
我們想要解碼的 id 清單。
- hasPrefixSpace
- Boolean
請指示編碼字串是否有前導空格。
- considerSpecialTokens
- Boolean
說明解碼時是否需考慮特殊標記。
傳回
解碼的字串。
適用於
Decode(IEnumerable<Int32>, Span<Char>, Int32, Int32)
將給定的 id 解碼回文字,並將結果儲存在該 destination 區間。
public override System.Buffers.OperationStatus Decode(System.Collections.Generic.IEnumerable<int> ids, Span<char> destination, out int idsConsumed, out int charsWritten);
override this.Decode : seq<int> * Span<char> * int * int -> System.Buffers.OperationStatus
Public Overrides Function Decode (ids As IEnumerable(Of Integer), destination As Span(Of Char), ByRef idsConsumed As Integer, ByRef charsWritten As Integer) As OperationStatus
參數
- ids
- IEnumerable<Int32>
我們想要解碼的 id 清單。
- idsConsumed
- Int32
解碼過程中消耗的 id 數量。
- charsWritten
- Int32
寫入目的地的字元數。
傳回
操作狀態表示所有 ID 是否已成功解碼,或 是否 destination 太小無法包含整個解碼結果。
適用於
Decode(IEnumerable<Int32>, Span<Char>, Boolean, Boolean, Int32, Int32)
將給定的 id 解碼回文字,並將結果儲存在該 destination 區間。
public System.Buffers.OperationStatus Decode(System.Collections.Generic.IEnumerable<int> ids, Span<char> destination, bool hasPrefixSpace, bool considerSpecialTokens, out int idsConsumed, out int charsWritten);
override this.Decode : seq<int> * Span<char> * bool * bool * int * int -> System.Buffers.OperationStatus
Public Function Decode (ids As IEnumerable(Of Integer), destination As Span(Of Char), hasPrefixSpace As Boolean, considerSpecialTokens As Boolean, ByRef idsConsumed As Integer, ByRef charsWritten As Integer) As OperationStatus
參數
- ids
- IEnumerable<Int32>
我們想要解碼的 id 清單。
- hasPrefixSpace
- Boolean
請指示編碼字串是否有前導空格。
- considerSpecialTokens
- Boolean
說明解碼時是否需考慮特殊標記。
- idsConsumed
- Int32
解碼過程中消耗的 id 數量。
- charsWritten
- Int32
寫入目的地的字元數。
傳回
操作狀態表示所有 ID 是否已成功解碼,或 是否 destination 太小無法包含整個解碼結果。