Share via


TextChunker.SplitMarkDownLines Method

Definition

Split markdown text into lines.

public static System.Collections.Generic.List<string> SplitMarkDownLines (string text, int maxTokensPerLine, Microsoft.SemanticKernel.Text.TextChunker.TokenCounter? tokenCounter = default);
static member SplitMarkDownLines : string * int * Microsoft.SemanticKernel.Text.TextChunker.TokenCounter -> System.Collections.Generic.List<string>
Public Shared Function SplitMarkDownLines (text As String, maxTokensPerLine As Integer, Optional tokenCounter As TextChunker.TokenCounter = Nothing) As List(Of String)

Parameters

text
String

Text to split

maxTokensPerLine
Int32

Maximum number of tokens per line.

tokenCounter
TextChunker.TokenCounter

Function to count tokens in a string. If not supplied, the default counter will be used.

Returns

List of lines.

Applies to