Korin API

ConcSplitter
in package

FinalYes

Splits an escaped 5.x line value into CONC parts. Splits fall only between grapheme clusters, never inside "@@" or an "@#…@" escape, and never next to a space (5.5.1: "values that are split for a CONC tag must always be split at a non-space"). Parts are as long as allowed.

Table of Contents

Methods

split()  : array<int, string>

Methods

split()

public static split(string $payload, int $first, int $rest, callable(string): int $measure) : array<int, string>
Parameters
$payload : string
$first : int

room for the value on the first line

$rest : int

room for the value on each CONC line

$measure : callable(string): int

length of a piece in the limit's units

Return values
array<int, string> —

the first line's value followed by the CONC values

On this page

Search results